Closed rani-priya closed 2 years ago
Hi @rani-webkul. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues 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.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
@magento I am working on this.
Hi @bharat1811! :wave:
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team
command to join Contributors team.
@magento add to contributors team
Hi @bharat1811! :wave: Thank you for joining. Please accept team invitation :point_right: here :point_left: and add your comment one more time.
@magento I am working on this.
@magento give me 2.4-develop instance
Hi @bharat1811. Thank you for your request. I'm working on Magento instance for you.
Hi @bharat1811, here is your Magento Instance: https://fe87be1a7cb1187e050f71ad653096dc-2-4-develop.instances.magento-community.engineering Admin access: https://fe87be1a7cb1187e050f71ad653096dc-2-4-develop.instances.magento-community.engineering/admin_1440 Login: 254116b9 Password: 5f7f638c1c5c
@rani-webkul The issue is not reproducible in the latest version.
Steps to verify,
1. Get customer cart details, { customerCart { id items { id product { name sku } quantity } } }
2. Apply created promo code, mutation { applyCouponToCart( input: { cart_id: "HvzaWRCngNlChASgYZkP6kF5SpeufPcv" coupon_code: "FLAT10" } ) { cart { applied_coupons { code } } } }
3. Get cart details, { cart(cart_id: "HvzaWRCngNlChASgYZkP6kF5SpeufPcv") { email telephone billing_address { city country { code label } firstname lastname postcode region { code label } street telephone } shipping_addresses { firstname lastname street city region { code label } country { code label } available_shipping_methods { amount { currency value } available carrier_code carrier_title error_message method_code method_title price_excl_tax { value currency } price_incl_tax { value currency } } selected_shipping_method { amount { value currency } carrier_code carrier_title method_code method_title } } items { id product { name sku } quantity } available_payment_methods { code title } selected_payment_method { code title } applied_coupons { code } prices { subtotal_including_tax{ value currency }, discount{ amount{ value } } grand_total { value currency } } } }
@magento give me 2.4-develop instance
Hi @rani-webkul. Thank you for your request. I'm working on Magento instance for you.
Hi @rani-webkul, here is your Magento Instance: https://fe87be1a7cb1187e050f71ad653096dc-2-4-develop.instances.magento-community.engineering Admin access: https://fe87be1a7cb1187e050f71ad653096dc-2-4-develop.instances.magento-community.engineering/admin_82fb Login: fb61d152 Password: abc997a2d2c6
@bharat1811 it's still reproduceable on upper instance as well.
Please use below cart query and then check
{
cart(cart_id: "l2X1hXV1PBgtdtMZMTseGWsVQzEcVpAi") {
email
billing_address {
city
country {
code
label
}
firstname
lastname
postcode
region {
code
label
region_id
}
street
telephone
}
shipping_addresses {
firstname
lastname
street
city
region {
code
label
region_id
}
country {
code
label
}
telephone
available_shipping_methods {
amount {
currency
value
}
available
carrier_code
carrier_title
error_message
method_code
method_title
price_excl_tax {
value
currency
}
price_incl_tax {
value
currency
}
}
selected_shipping_method {
amount {
value
currency
}
carrier_code
carrier_title
method_code
method_title
}
}
items {
id
prices {
row_total{
value
}
row_total_including_tax
{
value
}
total_item_discount {
value
}
price {
value
}
discounts {
label
amount {
value
}
}
}
... on SimpleCartItem {
customizable_options {
label
values {
value
}
}
}
... on ConfigurableCartItem {
configurable_options {
id
option_label
value_id
value_label
}
}
... on BundleCartItem {
bundle_options {
id
label
type
values {
id
label
price
quantity
}
}
}
product {
name
sku
stock_status
price_range{
minimum_price{
regular_price{
value
currency
}
}
maximum_price{
regular_price{
value
currency
}
}
}
image {
url
label
}
... on BundleProduct {
dynamic_sku
dynamic_price
items {
option_id
title
required
type
position
sku
options {
id
quantity
position
is_default
price
label
product {
id
name
sku
image {
url
label
}
typename
}
}
}
}
... on CustomizableProductInterface {
options {
title
required
sort_order
option_id
typename
... on CustomizableDropDownOption {
title
value {
price_type
option_type_id
title
price
sku
}
}
}
}
... on ConfigurableProduct {
configurable_options {
id
label
position
use_default
attribute_id
attribute_code
values {
value_index
label
}
product_id
}
variants {
product {
id
name
sku
stock_status
attribute_set_id
... on PhysicalProductInterface {
weight
}
price_range{
minimum_price{
regular_price{
value
currency
}
}
}
}
attributes {
label
code
value_index
}
}
}
crosssell_products {
name
sku
price_range {
minimum_price {
regular_price {
value
currency
}
final_price {
value
currency
}
discount {
amount_off
percent_off
}
}
maximum_price {
regular_price {
value
currency
}
final_price {
value
currency
}
discount {
amount_off
percent_off
}
}
}
image {
url
label
}
}
}
quantity
}
available_payment_methods {
code
title
}
selected_payment_method {
code
title
}
applied_coupons {
code
}
prices {
discounts {
amount {
value
}
label
}
grand_total{
value
currency
}
subtotal_including_tax{
value
currency
}
subtotal_excluding_tax{
value
currency
}
subtotal_with_discount_excluding_tax{
value
currency
}
applied_taxes{
amount {
value
currency
}
label
}
}
}
}
@magento give me 2.4-develop instance
Hi @rani-webkul. Thank you for your request. I'm working on Magento instance for you.
Hi @rani-webkul, here is your Magento Instance: https://fe87be1a7cb1187e050f71ad653096dc-2-4-develop.instances.magento-community.engineering Admin access: https://fe87be1a7cb1187e050f71ad653096dc-2-4-develop.instances.magento-community.engineering/admin_fdd7 Login: d35d23aa Password: 9f1a2d144b16
@magento I am working on this
@magento give me 2.4-develop instance
Hi @sathiyaaa. Thank you for your request. I'm working on Magento instance for you.
Hi @sathiyaaa, here is your Magento Instance: https://fe87be1a7cb1187e050f71ad653096dc-2-4-develop.instances.magento-community.engineering Admin access: https://fe87be1a7cb1187e050f71ad653096dc-2-4-develop.instances.magento-community.engineering/admin_86b5 Login: 88c9b072 Password: b1da997f8ec8
Thanks @rani-webkul for reporting this issue, I was also facing the same issue
This is the patch for the issue if anyone else might be looking for it 😄 https://github.com/magento/quality-patches/blob/master/patches/os/MDVA-31363__fixes_cart_price_rule_coupon_does_not_apply_via_graphQl__2.4.0.patch
Thank you @atishgoswami for the patch link. I have the same issue and I have tried to fix it with this patch:
--- a/vendor/magento/module-sales-rule/Model/Rule/Action/Discount/CartFixed.php
+++ b/vendor/magento/module-sales-rule/Model/Rule/Action/Discount/CartFixed.php
@@ -96,7 +96,7 @@
if (!isset($cartRules[$rule->getId()])) {
$cartRules[$rule->getId()] = $rule->getDiscountAmount();
}
- $availableDiscountAmount = (float) $cartRules[$rule->getId()];
+ $availableDiscountAmount = (float) $rule->getDiscountAmount();
$discountType = self::$discountType . $rule->getId();
I believe the main problem is linked with\Magento\SalesRule\Model\Rule\Action\Discount\CartFixed
and how the calculate method was build. The purpose of getCartFixedRules' on quote is very confusing for me. I see this data linked with multi-shipping and "allow shipping discount" option. In my case, I use discount for the whole cart without shipping and no multi-shipping.
The issue described in https://github.com/magento/magento2/issues/31496 is most likely connected with this problem. For the moment I will use both fixes, just in case the reset case is missing or forgotten.
+1 for the solution from @mariuscris - worked for me! 😃
I meet this bug too.
Confirmed that https://github.com/magento/magento2/issues/30719#issuecomment-778826680 fixes the problem for us on 2.3.7-p2 in the regular checkout.
@mariuscris you have a typo in your comment ";;"
Thanks @riconeitzel for spotting the typo. It should be corrected by now
Hi, I have an issue with cart Cart Price Rules. If I make a new rule, it only apply to last product in cart. Can anyone explain about it?
Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @rani-priya Verified the issue on Magento 2.4-develop instance with query mentioned in comment and as per devdocs as well but the issue is not reproducible. Grand total is displayed after discount. Kindly recheck the issue on Magento 2.4-develop branch and provide missing steps if any if the issue is still reproducible.
Hi @rani-priya , We are closing this issue as there has been no latest update on the same. Kindly reopen / create new issue if you are still facing any issues. Thank you.
Hey all
as per discussion with the internal team confirming the ticket.
Preconditions (*)
Steps to reproduce (*)
Go to magento backend
create a cart price rule with this configuration(In Apply set "Fixed amount discount for whole cart")
Then apply the same coupon on cart in by using graphql
In cart query check the grand total amount
Expected result (*)
Actual result (*)
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.