0

I don't want to use coupon code block on cart page so I delete the code on this file

/app/design/frontend/base/default/layout/checkout.xml

"block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"

This update works, there is no coupon code on my cart page, but if there is two or more items and I delete one of them, the discount code block show again and looks weird

Normal

https://www.dropbox.com/s/g4y9azefnyv5n2y/Cap%202014-10-05%2000-27-33-613.png?dl=0

After delete product

https://www.dropbox.com/s/qbgc3r5jdg7dknq/Cap%202014-10-05%2000-28-07-066.png?dl=0

What should I do the cart page work well after delete product?

or is there any other way to disable coupon code which don't make this problem?

2

Firstly you should never make changes to the core files. This includes your layout and template files located in the base folders. This would be considered a core hack, and will lead to issues down the road, especially when you upgrade.

The correct way to remove the coupon is via your local theme. There are a few different ways to apply this. One is via your theme local.xml file.

This file can be located in various places, all depending if you just use a theme, or a package, with a theme.

In this example, I am using a package, and the file is thus located here: /app/design/frontend/YOUR _PACKAGE/default/layout/local.xml

In there you will have a directive as such:

<checkout_cart_index>
 <reference name="checkout.cart">
    <remove name="checkout.cart.coupon"/>
 </reference>
</checkout_cart_index>

Hope that helps

3
  • Thanks for reply! Lesson learn about core files, so I should not edit all file in the 'base' categories? I just rollback my update and update your method it works the coupon code is not showing but still i got same issue after delete item, is there any file related cart page after delete a product? curious why it work only before delete item Thank you again !
    – Yohan
    Oct 5 '14 at 15:54
  • Sounds like you may have a 3rd party module that is returning to the cart via another controller and action. When you return to the cart after the delete, is the URL path the same as per original view? Not enough info in your post to debug that
    – ProxiBlue
    Oct 5 '14 at 23:34
  • Yeah, after delete item, the url is same,(the page is not loaded again). I didn't install any module for cart page. It seems my theme error? If you have time, please check my site, goo.gl/F4bGJp for more info
    – Yohan
    Oct 6 '14 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.