magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.5k stars 9.31k forks source link

On checkout page coupon code validation message break when enter coupon like "test/" #21353

Closed mageprince closed 4 years ago

mageprince commented 5 years ago

Preconditions (*)

  1. Magento 2.3.x

Steps to reproduce (*)

  1. Create a new Cart Price Rule from Admin > Marketing > Cart Price Rule

  2. Select the next setting and value -- Coupon = Specific Coupon -- Coupon Code = test/

  3. Go to Storefront as Guest or Registered user

  4. Add test product to Shopping Cart

  5. Go to Shopping Cart page

  6. Click "Apply Discount Code" and apply coupon "test/" (Discount Code is applied successfully) Screenshot from 2020-08-05 17-56-44

  7. Click "Apply Discount Code" again and "Cancel Coupon"

  8. Proceed to Checkout now(without cupon)

  9. Fill all required information for Shipping Address steps and go NEXT

  10. On Payment Method steps, Click "Apply Discount Code" and apply coupon "test/"

Expected result (*)

Actual result (*)

Screenshot from 2020-08-05 17-57-36

magento-engcom-team commented 5 years ago

Hi @mageprince. 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-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@mageprince do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

magento-engcom-team commented 5 years ago

Hi @krishprakash. 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:

krishprakash commented 5 years ago

@magento-engcom-team give me 2.3-develop instance

magento-engcom-team commented 5 years ago

Hi @krishprakash. Thank you for your request. I'm working on Magento 2.3-develop instance for you

magento-engcom-team commented 5 years ago

Hi @krishprakash, here is your Magento instance. Admin access: https://i-21353-2-3-develop.instances.magento-community.engineering/admin Login: admin Password: 123123q Instance will be terminated in up to 3 hours.

magento-engcom-team commented 5 years ago

Hi @shikhamis11. 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:

shikhamis11 commented 5 years ago

also at backend it is allowed to create coupon code like test/ . Coupon is being applied from checkout cart page but not from payment step

magento-engcom-team commented 5 years ago

:white_check_mark: Confirmed by @shikhamis11 Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-98339, MAGETWO-98340 were created

Issue Available: @shikhamis11, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

Shubham0492 commented 5 years ago

@magento-engcom-team give me 2.3-develop instance

magento-engcom-team commented 5 years ago

Hi @Shubham-Webkul. Thank you for your request. I'm working on Magento 2.3-develop instance for you

magento-engcom-team commented 5 years ago

Hi @Shubham-Webkul, here is your Magento instance. Admin access: https://i-21353-2-3-develop.instances.magento-community.engineering/admin Login: admin Password: 123123q Instance will be terminated in up to 3 hours.

josefbehr commented 5 years ago

@shikhamis11 So, we can create coupons that contain or end in "/" in the backend, but then not apply them in the frontend? Then we should fix the application of code, or completely block creation of such coupons.

m2-assistant[bot] commented 5 years ago

Hi @josefbehr. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:


shikhamis11 commented 5 years ago

Hi @josefbehr I think that must be completely blocked but I will discuss this with Magento members and let you know the exact fix for this

josefbehr commented 5 years ago

@shikhamis11 great, thank you. Please get back to me, if you need anything or when a new PR is created :)

sdzhepa commented 5 years ago

Hello @mageprince @shikhamis11 @josefbehr

Thank you for contribution and collaboration!

We have discussed the expected result for this case internally

In general:

So, should be fixed checkout flow to allow such coupons.

Unfortunately, fix like add validation on Admin side is not acceptable because it potentially could affect all merchants who already created and sent coupons with "/" or other special characters

I will update the description and expected result to reflect it

Bartlomiejsz commented 4 years ago

@magento-engcom-team @ihor-sviziev seems the issue is solved on 2.4-develop: image

ihor-sviziev commented 4 years ago

Hi @shikhamis11 could you confirm that issue is fixed and close the issue?

shikhamis11 commented 4 years ago

@magento-engcom-team give me 2.4-develop instance

shikhamis11 commented 4 years ago

Hi @ihor-sviziev I checked as per explanation of @sdzhepa coupon code with / is valid and it should be working at every place at checkout as well as on shopping cart .. I checked on magento 2.4-develop instance It seems working at checkout cart page but not on checkout page .. so this issue persist at magento 2.4-develop instance also

ihor-sviziev commented 4 years ago

@shikhamis11 thank you!

@Bartlomiejsz looks like this issue still there

Bartlomiejsz commented 4 years ago

@ihor-sviziev @shikhamis11 that's weird, you can see on image attached in my previous comment that on my local which is clean fork of 2.4-develop this request was finished successfully and coupon code was added. On github test instance it ends with 404. If I'll be able to I'll try to verify what can be a difference here somewhere in future

ihor-sviziev commented 4 years ago

@Bartlomiejsz It might be related to apache vs nginx configuration. On test instances we have apache and seems like it is configure incorrectly.

I think it might be related to following: https://github.com/magento/magento2/issues/13343#issuecomment-362783825 https://github.com/magento/magento2/issues/8615#issuecomment-588980345

Bartlomiejsz commented 4 years ago

Definitely looks like it @ihor-sviziev, I'm using nginx locally, so setting AllowEncodedSlashes should fix this for apache I think 👍

ihor-sviziev commented 4 years ago

Hi @slavvka @sidolov @lenaorobei @naydav, Could you help to resolve incorrect Apache configuration of test instances?

@Bartlomiejsz in addition to that I reported issue to describe needed configuration in the devdocs https://github.com/magento/devdocs/issues/6689

m2-assistant[bot] commented 4 years ago

Hi @ihor-sviziev. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:


nwmagento commented 4 years ago

@magento-engcom-team give me 2.4-develop instance

magento-engcom-team commented 4 years ago

Hi @nwmagento. Thank you for your request. I'm working on Magento 2.4-develop instance for you

magento-engcom-team commented 4 years ago

Hi @nwmagento, here is your Magento instance. Admin access: https://i-21353-2-4-develop.instances.magento-community.engineering/admin_ebfd Login: d30578be Password: 06cde9c69b47 Instance will be terminated in up to 3 hours.

ihor-sviziev commented 4 years ago

Hi @mageprince, I'm closing this issue as the issue was in the web server configuration. This info was added to dev docs: https://devdocs.magento.com/guides/v2.3/install-gde/prereq/apache.html#apache-required-directives