-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Craft Commerce auto-complete broken (again?) #10
Comments
btw I think it should be:
|
Hi Andrew, The commerce annotation is in the file as expected. Is there anything else that could be wrong? PS: The official docs also use |
Are you still having issues with this? |
Unfortunately yes. |
To be clear, you're saying this doesn't autocomplete:
...but this does?
? If the answer is that neither autocomplete, please go to Preferences -> Symfony and ensure Enable Plugin for this Project is enabled, and then click on the CLEAR INDEX button. Wait for it to re-index, and then try the second examples again, they are autocompleting for me here: |
Addressed via: 73216c7 Released as You can update to it via:
It will now generate something that looks like this in /**
* ...
* @property \craft\commerce\Plugin $commerce
* @method orders($criteria): craft\commerce\elements\db\OrderQuery
* @method subscriptions($criteria): craft\commerce\elements\db\SubscriptionQuery
* @method products($criteria): craft\commerce\elements\db\ProductQuery
* @method variants($criteria): craft\commerce\elements\db\VariantQuery
*/ This means that you will now get autocomplete for:
...for Commerce specifically. Video of it in action: Screen.Recording.2022-12-19.at.7.05.17.PM.movTo ensure it shows up, you can manually regenerate the autocompletes via CLI:
If you still don't see it show up, please go to Preferences -> Symfony and ensure Enable Plugin for this Project is enabled, and then click on the CLEAR INDEX button. |
I finally got it working, thanks! On a side note: maybe you could add |
What version of Commerce are you using? |
Commerce 4.2.4 Then maybe I was testing the discount when I was still on EAP version. |
Describe the bug
Similar to this issue: #6
craft.commerce
craft.orders
craft.products
None are autocompleted or recognized.
Versions
The text was updated successfully, but these errors were encountered: