X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Making Coupon Field Disappear after valid code is entered (https://forum.x-cart.com/showthread.php?t=4117)

rodneyw 08-25-2003 04:57 PM

Making Coupon Field Disappear after valid code is entered
 
I am running 3.4.4 and on the Cart page where the coupon field is located I would like to make it "disappear" after a coupon is entered and Display a message telling them that a coupon has already been applied to this order.

````````````````````

Once again never mind, I got it. I just checked the cart_total.tpl file to see how IT was checking for a coupon.

Here how I changed the call to the coupon in the cart.tpl file if anyone is interested.
Code:

{if $cart.coupon_discount ne 0}
A coupon code has already been used on this order
{else}
{if $active_modules.Discount_Coupons ne ""}
{include file="modules/Discount_Coupons/add_coupon.tpl}
{/if}
{/if}


groovico 08-26-2003 10:27 AM

Nice one, I was thinking about this very problem yesterday since we were discussing coupons and gift coupons :)

Xixao 01-05-2004 01:49 PM

This is pretty obvious code, but I thought I'd add it here, cause it makes the addition look a lot cleaner. Replace the code listed above with:

Quote:


{if $cart.coupon_discount ne 0}
<center>A coupon code has already been used on this order</center>
{else}
{if $active_modules.Discount_Coupons ne ""}
{include file="modules/Discount_Coupons/add_coupon.tpl}
{/if}
{/if}




That's it. Just a few extras. Nothing special. :wink:

nfc5382 01-05-2004 01:56 PM

great mod!

leon 01-05-2004 07:38 PM

nfc5382: I agree, and talking about great mods, I saw your site last month but I cant figure out how you added the small bike icons next to your menu items, are they cold coded ?

nfc5382 01-06-2004 03:46 PM

ya those are just hard coded buttons (the LH navigation buttons). Its just what I had before I incorporated xcart into my site. I ended up keeping them and putting xcart around the existing site.

curpier 01-11-2004 09:43 AM

Looks like a great Mod. Can anyone tell me what code I need to replace with the code above to get this to work. I'm still learning. Thanks much.

Adam


All times are GMT -8. The time now is 03:02 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.