-
Notifications
You must be signed in to change notification settings - Fork 171
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
Allow search on Order ID in CMS #2001
Comments
@oadslug Could you add the order ID to the order reference format? the reference is searchable. |
@lukeholder I'm not sure I understand the question Luke. Can you clarify? (Then again I haven't finished my coffee yet—might make sense in an hour or so ;) Currently the client tries to enter their 'Invoice Number' (which is set to the 'Order ID') in the search field in the CMS, and does not get any results. |
@oadslug Orders have IDs (which is basically the Craft element ID and thus not sequential) as well as an Order Reference (which can be made sequential). Commerce lets you specify the format for your Order Reference under Commerce->System Settings->General Settings. It's possible to use Twig in the format so what Luke is suggesting is including the Order ID in that reference as it is already searchable. So you could have the reference format as something like |
@fantasticmachine Understood. Thank you. Much appreciated. When I first set up the commerce site that functionality did not exist, so not the first thing I think of. Thanks again. |
@lukeholder I came across this when looking at why I couldn't search by the commerce/src/elements/traits/OrderElementTrait.php Lines 219 to 238 in effbe49
Is there a good reason why id is excluded? It'd be handy to have it |
@shaunmolloy What is the use-case for searching by ID? Isn't the order reference enough? You can always put the ID into the reference. |
This will be solved in Craft 4 when we add the element index condition builder |
I'd be happy to do that on a new site, but I wouldn't fancy chancing
Great stuff. Is there a date in mind for when v4 be stable? Is there a roadmap? |
You can track the feature here: craftcms/cms#1630 If you want to add it for your site you can use the My guess is you are trying to find the order by ID as a developer, and store administrators are not really needing to search by ID. Is that the case? |
Another reference: craftcms/cms#7062 |
For the site in mind, the order id is passed to a finance gateway and
It's easy for us devs to find orders as we can just place the id in the The client on the other hand can have a hard time finding orders, When doing this I found that for products you can only search by
Thanks! I've took a note of that in a task. I've just seen the milestone in Github for v4. |
Thanks. Closing this here for now. please follow craftcms/cms#7062 |
Currently it is only possible to use the reference number or the short reference number to search for orders within the CMS. Please consider adding the ability to search orders using Order ID (aka Entity ID). My client currently uses the Order ID as the invoice number (as I assume many others do as well), and cannot easily find orders without cross referencing them to ref number, or email address.
(It would be nice if this were implemented throughout Craft for all entities, but that is a separate issue.)
The text was updated successfully, but these errors were encountered: