Magento2: Cart Price Rule doesn't work with 'Shipping Country' condition

Created on 19 May 2017  路  8Comments  路  Source: magento/magento2

Hi all!

Preconditions

  1. Magento 2.1.5 CE (clear version)

Steps to reproduce

  1. Go to Marketing -> Cart Price Rules
  2. Create a coupon code. The main issue to set 'Shipping Country' (e.g Germany) in the Conditions tab.
  3. Add some products to the cart and go to cart page.
  4. Select 'Germany' in the estimated shipping block.

    5. Try to apply coupon code.

  5. Log in to my account, create address and set Germany country.

  6. Go to cart page and try to apply coupon code again

    Expected result

Coupon code should be applied, because the country is the same.

Actual result

'The coupon code "%1" is not valid.' - for both variant: when I set estimated shipping country and also when I logged in with needed address. But when I got to the second step of checkout I can apply this coupon code. I've made some investigation and found in the _validateCouponCode method (Magento\Quote\Model\Quote\TotalsCollector) address objects don't contain any information about address even if customer is logged in.

Thanks,
Alena

Checkout Cannot Reproduce Clear Description Format is valid Ready for Work bug report

Most helpful comment

its still bug in the 2.2.3 , any solution?

All 8 comments

@atsareva We cannot reproduce this issue as described. Please provide the detailed steps we must follow to reproduce this issue. In addition, identify the web server you are running, the versions of PHP and MySQL, and any other information needed to reproduce your issue.

@Stas94
Recently I've updated magento to version 2.1.7 with sample data and have the same issue
I have PHP 7.0.18 and mysql Ver 14.14 Distrib 5.7.18

Steps to reproduce

  1. Create coupon code
    cart_price_coupon

  2. Create a new customer and set address
    customer_addresses

  3. Add product and go to shopping cart

  4. Try to apply coupon code there
    shopping_cart

  5. Go to the second step of checkout and try to apply coupon code again
    checkout

Thanks.

@atsareva Thanks for reporting this issue. We've created internal ticket MAGETWO-70212 to address this issue.

I have the same problem with the "shipping country" condition, but in my case it happens without using coupons, we apply a 10% discount if the "shipping country" match the rule.
I noticed that in the second step of the checkout, if we go back to the first step (or do a refresh of the page) and then go to the second step, the discount appears.

@atsareva, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
We tested the issue on 2.3.0, 2.2.0, 2.1.9

@magento-engcom-team This issue is reproducible for Guest. Once you login - coupon applies successfully.

@magento-engcom-team, this is still a bug in 2.2.3 as a guest within the cart.

its still bug in the 2.2.3 , any solution?

Was this page helpful?
0 / 5 - 0 ratings