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
Multishop - BO : Fix orders not appearing in order list for shared space shops #17767
Multishop - BO : Fix orders not appearing in order list for shared space shops #17767
Conversation
@@ -206,7 +206,7 @@ services: | |||
- '%database_prefix%' | |||
- '@prestashop.core.query.doctrine_search_criteria_applicator' | |||
- '@=service("prestashop.adapter.legacy.context").getContext().language.id' | |||
- '@=service("prestashop.adapter.shop.context").getContextListShopID()' | |||
- '@=service("prestashop.adapter.shop.context").getContextListShopID("share_order")' | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here "share_order" is the value of a constant in the Shop ObjectModel: const SHARE_ORDER = 'share_order';
I'm sure there must be a way not to hardcode it in the yml but I don't know how 😅 Any idea ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can have a look at https://symfony.com/blog/new-in-symfony-3-2-php-constants-in-yaml-files :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanx !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I cannot use this directly in a method parameter.
I also tried putting the class constant in a yaml parameter, and using it as a parameter for the getContextListShopID method, it doesn't work either...
I see no other way than to hardcode it for now...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PierreRambaud ok with @matks we found that we have to use the "parameter()" method 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same feedback than Pierre; else code is 👍
Thanks @matthieu-rolland |
- Go to Shop parameters > General and enable multistore
- Go to Advanced parameters > Multistore
- Click on Add new shop group "all shared group"
- Share customers, share available quantities to sell, share orders
- Create a new store "shop3" in "all shared group"
- Create a new store "shop4" in "all shared group"
- Make an order in FO in shop3
- Go to orders > orders migrated listing
- Select shop4
- You should see the order make in shop3 because orders are shared in this group
This change is