-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cart calculate without Customer after login #6629
Comments
[public] Shopware automated response: This issue is linked to the internal issue: NEXT-40587 [created from NEXT-40587, comment 538153] |
Just for clarity: I'm not exactly sure about the timing of your bug ticket. Are you talking about one cart calculation being done without the customer, when the If this is not what you are talking about and you are not talking about calculations during the |
Hi Max, It does indeed happen on the LoginRoute. However there is, in our case, no cart before login. (Or well, it is always empty). So even after merging, the cart is calculated once without the customer in the context. I understand that the original cart should be calculated without the customer, but should it not always contain the customer after the merge? |
It should, yes. We will try to reproduce this on a fresh system. I assume, this behavior happens inside a cart processor or collector? Do you use the Twig Storefront or are we talking about composable frontend / direct API access? |
[public]
Thank you for your report. Based on the information in this report, we have decided to investigate this issue in more detail and are planning to provide a fix for this issue. Although we are always eager to solve such problems as soon as we can, we can't give you a more specific time frame right now. We appreciate your patience and thank you for your understanding. [created from NEXT-40587, comment 538550] |
PHP Version: 8.3 | Shopware Version: 6.6.9.0 | Affected area / extension: Platform(Default)
Actual behaviour:
After logging in, the cart is calculated the first time without the Customer entity present in the SalesChannelContext. When loading customer-specific data this can adapt the cart with default data.
In our case, we have customer-specific Minimum Order Quantities. When a customer logs in who can order "per 1 piece" instead of following the general MOQ of the product, the cart is filled with the MOQ when they log in. After that they can again use their cart as normal, ordering just the single quantities. However on logging in, their cart is calculated once without the Customer entity present in the SalesChannelContext, when the quantities are changed to the product MOQ.
Expected behaviour:
After login, the Customer entity is present in the SalesChannelContext when the cart is calculated.
How to reproduce:
Has to be reproduced in a project with customer-specific data customization. On product load, the 'minPurchase' field is set to 1 for certain customers.
Log in as this customer and add products to cart in any qty lower than the minPurchase for that product.
Log out
Log in again. The cart will have been set to MOQ for all products.
The text was updated successfully, but these errors were encountered: