Discount Coupon Entry not Displaying Opencart 1.5.3.1

Opencart Cart Version 1.5.3.1

We have been using opencart Version 1.5.3.1 with a custom template or skin. We found that the skin had some coding that stepped users through the “cart” step of the checkout, directly to the checkout process.

The stops the “voucher or coupon” step being available to the end user during checkout. (Unless they had more than one item in their cart).

The problem appears to be that the template is using the code:

<a href="<?php echo $checkout; ?>"

 

rather than:

<a href="<?php echo $cart; ?>"

 

You see the difference is the word “checkout” vs “cart” in this string.

This means that when you click on the:

image

icon for checkout, you are directed to:

domain.com/index.php?route=checkout/checkout

where you need to go to get the coupon option is:

domain.com/index.php?route=checkout/cart

 

Things to check first

1. Ensure you have added coupon codes!

The first obvious check is to ensure you have added voucher (discount) codes to your storethrough OpenCart’s administration panel, in Sales > Coupons.

image

2. Ensure Coupons are enabled in OpenCart

Next, we need to check the coupons feature is enabled in OpenCart. In OpenCart 1.5+, this is located in the Extensions > Order Totals menu in the administration panel. Make sure that the Coupons feature is enabled (it should be by default).

image

3. The Fix

Use a program that will search all files in your website structure looking for the phrase:

<a href="<?php echo $checkout; ?>"

and replace it with

<a href="<?php echo $cart; ?>"

 

What you will probably find is an error when you then try to proceed from the “Cart” to the correct “Checkout”

We found that the find and replace we did, broke the actual button found here:

image

But the good news was that the fix is really easy.

If you hover on that link / button you will find that the error message appears that says something like: Undefined Error in (and lists the file) and the line number.

Just open that file, find the correct line number, and replace the word “cart” with “checkout” in that once instance.

The net result being that you are changing all but one of the instance of the <a href="<?php echo $checkout; ?>" string.

Author: InteractiveWebs

This blog is the combined blog work of the InteractiveWebs Dev Team. Together we work on a range of DotNetNuke (DNN) applications, modules, Silverlight, and Microsoft CRM Portal integration products. Our Business is website design and hosting, with a strong focus on DotNetNuke, Microsoft Dynamics CRM, Silverlight and iPhone iPad development.

4 thoughts on “Discount Coupon Entry not Displaying Opencart 1.5.3.1”

  1. I know its hard to believe but this website is actually still valid. I am using a newer version of Opencart and had the same question. I had coupons turned off in Order Totals which I have never seen before.
    Thanks
    Scott

Leave a Reply

Your email address will not be published. Required fields are marked *