-
Notifications
You must be signed in to change notification settings - Fork 9.4k
magento/magento2#31779:Cart Price rule not working as expected for joined mutation for configurable options update - changed key for validator #31838
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
magento/magento2#31779:Cart Price rule not working as expected for joined mutation for configurable options update - changed key for validator #31838
Conversation
…tion for configurable options update - changed key for validator
Hi @sasha19957099. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
…tion for configurable options update - added test
@magento run all tests |
…tion for configurable options update - fixed unit tests
@magento run all tests |
…tion for configurable options update - fixed unit tests
@magento run all tests |
* @return $this | ||
*/ | ||
public function init($websiteId, $customerGroupId, $couponCode) | ||
public function init($websiteId, CartInterface $quote): self |
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.
I'm afraid we can't do this in a patch release. no protected and especially public methods modification. Won't be able to approve SVC
At most we could add an optional parameter which is CartInterface $quote = null
Also don't change the return type, leave self out
Hi @sasha19957099, Thank you for your contribution! In reproduction steps of this issue, you are using addConfigurableProductsToCart mutation. As per dev docs it is recommended of using addProductsToCart mutation rather than addConfigurableProductsToCart mutation. Hence before proceeding with this PR, in discussion with the PO for the same. Till that time moving this PR to On Hold. Thank you! CC: @cpartica |
As per @cpartica confirmation we need to process it ahead so moving this PR back to Changes Requested. Thank you! |
Hi @sasha19957099, Thank you for your contribution! As per the review comments, we can not go with the given solution in this PR as its making modifications in public methods. Do you want to propose any other solution for the linked issue. Thank you! |
As we didn't got any reply on above comment, due to inactivity, closing this PR now. Please reopen and update if you wish to continue. Thank you for your contribution! |
Description (*)
Changed key in sales rules validator to avoid incorrect cached results
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
mutation UpdateConfigurableOptions(
$cartId: String!
$cartItemId: Int!
$parentSku: String!
$variantSku: String!
$quantity: Float!
) {
addConfigurableProductsToCart(
input: {
cart_id: $cartId
cart_items: [
{
data: { quantity: $quantity, sku: $variantSku }
parent_sku: $parentSku
}
]
}
) {
cart {
id
total_quantity
available_payment_methods {
code
title
}
prices {
grand_total {
value
currency
}
}
}
}
removeItemFromCart(input: { cart_id: $cartId, cart_item_id: $cartItemId }) {
cart {
id
total_quantity
available_payment_methods {
code
title
}
prices {
grand_total {
value
currency
}
}
}
}
}
variables
{
"cartId":"HrDsuEYzcAfHDtP7Cy09Vhf0gbI0VgVU",
"cartItemId":13,
"parentSku":"WJ01",
"variantSku":"WJ01-S-Red",
"quantity":2
}
Questions or comments
Contribution checklist (*)