Advanced Coupons 1.8 Removing Shipping Charges with Checkout 2.2

I wanted to share a bug I found with Checkout – Advanced Coupons 1.8 and Checkout 2.2, along with the fix that worked for me, I had contacted support about this a while ago but it never got fixed.

When any regular discount coupon was applied, the customer could enter their shipping address and select a shipping method normally. However, once they continued to the billing page, the selected shipping charge disappeared completely and was not included in the order total.

The coupons did not have Free Shipping enabled.

I traced the issue to checkout-coupons/coupons.php. Regular coupons were making it into the free-shipping processing and causing $shipping to be set to 0.

Around line 1205, I changed the condition to:
if (((!empty($coupon -> discount_type) && $coupon -> discount_type == "freeshipping") || !empty($coupon -> freeshipping)) && (empty($coupon -> usage) || $coupon -> usage != "auto")) {

I also added the same check for discount_type == "freeshipping" or freeshipping being enabled to the condition around line 1217.

After making those changes, regular discount coupons correctly retain the customer's selected shipping charge.

Posting this in case anyone else runs into the same issue, and so the Tribulant team can take a look and hopefully incorporate an official fix in a future update.
Sign In or Register to comment.