-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fix orders by shop #39
base: dev
Are you sure you want to change the base?
Conversation
lmeyer1
commented
Jul 22, 2022
Questions | Answers |
---|---|
Description? | In multishop environment, we must take into account the shop where the orders were placed. Create an index to optimize the query. |
Type? | bug fix |
BC breaks? | no |
Deprecations? | no |
Fixed ticket? | Fixes PrestaShop/PrestaShop#29136. |
How to test? | See the behavior explained in PrestaShop/PrestaShop#29136 |
I think we should move the optimization part to the core itself. It does make sense to have an index on this field, but the native module shouldn't be responsible for core optimization. btw. great job with finding all these issues with multi-store, love it ❤️ |
d657650
to
71f9e37
Compare
You suggest just to delete the new |
yes :) The problem is that DB changes are not possible in patch versions, so the next version for this could be either 8.0 or 8.1 - and I'm pretty sure for a store with many orders, this change is critical? I'm unsure if we can put it in 8.0 as it has been feature-frozen. About the process. You need to modify the DB structure in the core + add this upgrade script to the Before doing that, we need to make sure if it's a good change + if we can do that for 8.1 or somehow put it to 8.0. I'll ping other maintainers to help us out @PrestaShop/prestashop-maintainers |
@kpodemski |
@kpodemski I think @lmeyer1 is right, we can already merge this fix while we can work on the index of the core db structure for later? |
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.
Hello @lmeyer1 ,
As mentioned in the issue, I didn't reproduce it without PR.
PrestaShop/PrestaShop#29136 (comment)
The behavior without PR is the same as with PR, so I am waiting for your feedback before testing it.
Thank you ! 🙏
@MhiriFaten As stated in the issue, you didn't observe the behavior of the crossselling module in the product details in the FO. But the difference in behavior is there, where you didn't look at! |
@kpodemski @lmeyer1 I think we can merge it right away, it works fine. But I have one last question - what do you think about an idea of adding a switch for this behavior? Maybe it does not matter on which store the people bought the products together, no? You would maybe get a bigger sample with the original behavior. Something like |
@Hlavtox is right. There are scenarios, where it makes sense to use all shop's data to get the list of products to display, and others where we want to avoid to mix the data from different shops. |