X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Coupon Code "accepted" (https://forum.x-cart.com/showthread.php?t=45798)

Lee 02-24-2009 12:42 AM

Coupon Code "accepted"
 
Morning all,

Can anyone recommend any code to enable me to chnage the following on our site -

On Checkout we have a Coupon Code field, we run various Deals of the Day/Week, at the moment if a customer adds the code the page doesn;t inform them whether its been accepted or not, the Coupon Code just appears in the Confirmation of Order email.

modules/Discount_Coupons/add_coupon.tpl
is obviously the file I need to edit, but not sure how!!

I simply want to display a some text upon submission of the coupon code to say whether its been accepted or not.

Any advice??

Thanks in advance,

balinor 02-24-2009 04:02 AM

Re: Coupon Code "accepted"
 
It doesn't show in the order totals? That's the way X-Cart coupons work by default - they show as a line item in the sub-total with a red x next to it to remove it.

Lee 02-24-2009 04:24 AM

Re: Coupon Code "accepted"
 
Sorry, should have explained in a bit more detail.

We very very rarely use coupon codes to give money off an order, instead we promote free gifts when you spend over a certain amount on our own brand products. This could be ipods, digital cameras etc.

So for instance this week, spend over ё400 get an ipod shuffle, coupon code is LTIPOD.

Now this is setup in the coupon codes as "Free delivery" against an order totalling over ё400, this shows in the Confirmation of order email displaying the coupon code just under subtotal.

But I just want to place something when the original coupon code is submitted to say it has been entered, as we don;t use coupon codes to discount, the customer doesn;t see the code till they have completed the order so we get lots of customers entering it in the notes, i.e. "entered LTIPOD but nothing happened"

I just want to trigger something to say it has been entered.

maineiac 10-06-2009 08:18 AM

Re: Coupon Code "accepted"
 
Lee - I'm using 4.1.8 so I'm not sure if this will apply to your version or not.... But it's a quick fix for my customers to know that the coupon has been accepted.

1) Create a new language variable: txt_coupon_accepted
2) In skin1/modules/Discount_Coupons/discount_coupons.php find the following (around line 74):

# Add discount coupon
} elseif($my_coupon == 0) {
$cart["discount_coupon"] = $coupon;
}

and change it to:

# Add discount coupon
} elseif($my_coupon == 0) {
$cart["discount_coupon"] = $coupon;
$top_message['content'] = func_get_langvar_by_name("txt_coupon_accepted");
}

When a valid coupon is submitted, your txt_coupon_accepted text will appear in that ugly error/warning/information box in dialog_message.tpl.

Hope this helps someone...I just realized that the original post is 7 months old...but I was searching for this answer and perhaps someone else will be too!


All times are GMT -8. The time now is 07:40 AM.

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