Skip to content
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

Merged

Conversation

matthieu-rolland
Copy link
Contributor

@matthieu-rolland matthieu-rolland commented Feb 20, 2020

Questions Answers
Branch? 1.7.7.x
Description? In multishop, when two shops share the same space and the space is configured to share orders: an order made on one shop should appear on the other in the order list in the BO. See issue for more detailed explanations.
Type? bug fix
Category? FO
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #17727
How to test? Copy pasted from the issue:
- 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 Reviewable

@matthieu-rolland matthieu-rolland requested a review from a team as a code owner February 20, 2020 16:53
@prestonBot prestonBot added 1.7.7.x Branch Bug Type: Bug labels Feb 20, 2020
@matthieu-rolland matthieu-rolland changed the title pass missing parameter to get share orders between shop of the same s… [Multishop - BO] Fix orders not appearing in order list for shared space shops Feb 20, 2020
@@ -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")'

Copy link
Contributor Author

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 ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanx !

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PierreRambaud

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...

Copy link
Contributor Author

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 👍

@matthieu-rolland matthieu-rolland added the migration symfony migration project label Feb 20, 2020
Copy link
Contributor

@matks matks left a 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 👍

@matthieu-rolland matthieu-rolland added the Waiting for QA Status: action required, waiting for test feedback label Feb 28, 2020
@boubkerbribri boubkerbribri added QA ✔️ Status: check done, code approved and removed Waiting for QA Status: action required, waiting for test feedback labels Mar 11, 2020
@boubkerbribri boubkerbribri added this to the 1.7.7.0 milestone Mar 11, 2020
@Progi1984 Progi1984 merged commit dd32217 into PrestaShop:1.7.7.x Mar 11, 2020
@Progi1984
Copy link
Contributor

Thanks @matthieu-rolland

@Progi1984 Progi1984 changed the title [Multishop - BO] Fix orders not appearing in order list for shared space shops Multishop - BO : Fix orders not appearing in order list for shared space shops Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.7.x Branch Bug Type: Bug migration symfony migration project QA ✔️ Status: check done, code approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants