Problem/Motivation

For the same reasons as per #2878155: When I press return to update the quantity of a line item it shouldn't be deleted, when user enters a coupon code and press enter, the first submit button of the form is triggered.
- If used from the checkout sidebar, it may go to next step
- When your coupon form is within the cart via #2872455: Allow coupons to be redeemed on the cart page, the first order item is remove from cart.

Even if not used within the cart, it makes sense that, if user press enter while writing a coupon code in the form, it submits the coupon.

CommentFileSizeAuthor
#2 auto_submit_coupon--2896303-2.patch2.25 KBdom.

Comments

Dom. created an issue. See original summary.

dom.’s picture

Status: Active » Needs review
StatusFileSize
new2.25 KB

Patch attached for review.

sorabh.v6’s picture

Assigned: Unassigned » sorabh.v6
sorabh.v6’s picture

Assigned: sorabh.v6 » Unassigned
Status: Needs review » Reviewed & tested by the community

Hi All,

I confirm that the patch in #2 is working correctly for me and code also looks good.

Setting it to RTBC.

Thanks All

bojanz’s picture

Status: Reviewed & tested by the community » Needs work

We need to sync this with the improvements made in #2878155: When I press return to update the quantity of a line item it shouldn't be deleted (:input, once).

  • bojanz committed 6a98afc on 8.x-2.x authored by Dom.
    Issue #2896303 by Dom., sorabh.v6, bojanz: Auto-submit coupon on press...
bojanz’s picture

Status: Needs work » Fixed

Done. Thank you both.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.