Skip to content

Solve couponcode error message break issue #21354

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

Closed
wants to merge 3 commits into from
Closed

Solve couponcode error message break issue #21354

wants to merge 3 commits into from

Conversation

mageprince
Copy link
Contributor

@mageprince mageprince commented Feb 20, 2019

Description (*)

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

Fixed Issues (if relevant)

#21353

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Contributor

Hi @mageprince. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

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

@miguelbalparda
Copy link
Contributor

Does this happen with any other special char?

@miguelbalparda miguelbalparda self-assigned this Feb 20, 2019
@mageprince
Copy link
Contributor Author

@miguelbalparda No, this issue not raised with other special characters. This will happened only with "/" because API /V1/guest-carts/:cartId/coupons/:couponCode consider as new URL.

@ishakhsuvarov
Copy link
Contributor

@mageprince Wouldn't it be better to encode this slash in some way instead of removing it completely?

@mageprince
Copy link
Contributor Author

@mageprince Wouldn't it be better to encode this slash in some way instead of removing it completely?

If we encode slash here then we also need to decode slash in \Magento\Quote\Model\CouponManagement::set which is not best way. becuase this function also used in other place like cart page which uses controller to pass the coupon code instead of API.

The main issue here is only with "/" if we enter coupon like "test/" then it will contain url like http://www.example.com/rest/default/V1/carts/mine/coupons/test%2F and which going to 404 not found.

@mageprince
Copy link
Contributor Author

@miguelbalparda Any update on this PR ?

@m2-assistant
Copy link

m2-assistant bot commented Jun 26, 2019

Hi @mageprince, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@m2-assistant
Copy link

m2-assistant bot commented Jun 26, 2019

Hi @mageprince. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

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

@ghost ghost unassigned miguelbalparda Jun 26, 2019
@josefbehr josefbehr self-assigned this Aug 13, 2019
@josefbehr
Copy link
Contributor

@mageprince if we can create such coupon codes (containing or ending in "/"), this issue is not solved by the PR. I'm trying to get clarification on this, until then I'll put this PR on hold.

@sidolov sidolov changed the base branch from 2.3-develop to 2.4-develop December 5, 2019 17:21
Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mageprince,
Looks like this PR got stuck. I'm trying to push it forward.

We have update in the issue description, so expected result was changed. More details #21353 (comment)

Could you update your PR according to new requirements?

@ghost ghost assigned ihor-sviziev Jan 27, 2020
@engcom-Golf engcom-Golf self-assigned this Feb 7, 2020
@engcom-Golf
Copy link
Contributor

Hi @mageprince could you please sign CLA ?, as we cannot proceed until you not signed.

…o mageprince-2.3-Fix-couponcode-error-message
@ihor-sviziev
Copy link
Contributor

@mageprince I am closing this PR now due to inactivity.
Please reopen and update if you wish to continue.
Thank you for the collaboration!

@m2-assistant
Copy link

m2-assistant bot commented Feb 17, 2020

Hi @mageprince, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants