| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Editable coupons | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Editable coupons
This works in my modified 4.0.17 X-Cart. No warranty expressed or implied and all that sort of thing. It allows you to change the amount, times, and most importantly expiration date of a coupon. Changing the type isn't supported because I only use percentage coupons. But it seems pretty clear how to do it. When I finish upgrading to 4.1.19 (or whatever it is by the time I'm done), I'll post the update if no-one else beats me to it.
First, back up your coupons table (or whole DB). Or at least have a browser window open on your current coupon list. When I was developing this, an error led to the expiration time of all coupons being set to Dec 31, 1969. Don't let this happen to you... provider/coupons.php: Find Code:
Change to Code:
Now, in skin1/modules/Discount_Coupons/coupons.tpl: Find Code:
Change to Code:
For extra credit, if you would prefer to see newest (or longest time-to-live) coupons at the top of the list, then also in provider/coupons.php: Find Code:
Change to Code:
__________________
Gold 4.0.17 On Sale, Smart Search, X-AOM, X-SpecialOffers, XNews, DSEFU, and custom mods/tweaks |
|||||||
#2
|
|||||||
|
|||||||
Re: Editable coupons
Any update on this for 4.1.9 at all ?
__________________
Fayette X-Cart Pro v4.1.6 |
|||||||
#3
|
|||||||
|
|||||||
Re: Editable coupons
Sorry. Haven't upgraded yet. Is the coupon infrastructure significantly different? There's nothing particularly tricky about this change.
__________________
Gold 4.0.17 On Sale, Smart Search, X-AOM, X-SpecialOffers, XNews, DSEFU, and custom mods/tweaks |
|||||||
#4
|
|||||||
|
|||||||
Re: Editable coupons
Bad ass, thanks! I am plagued by a tendency to not give my coupons enough times, or listen to the bleeding hearts of procrastinators.
__________________
Buy Stuff at Heeltoeauto.com! x-cart version 4.4.3 Best Web Hosting at EWD Great mods from Altered Cart BCS for my software modification and integrateion. Working awesome! |
|||||||
#5
|
|||||||||
|
|||||||||
Re: Editable coupons
Great mod, thanks for sharing.
Now I can just update the expiration date and have a permanent "Free shipping on Tuesday orders". If the coupon could be made day sensitive instead of date sensitive... it would be perfect. Any suggestions?
__________________
Cordially, Just me X-Cart Gold Version 4.2.3 Multilingual shop: Spanish, French and US English Last edited by just_me : 10-28-2008 at 12:51 AM. Reason: additional information |
|||||||||
#6
|
|||||||
|
|||||||
Re: Editable coupons
Just thought I'd share this... but we were looking for a way to edit coupons (mass edit) to require a minimum for the coupons to be used (we have over 100 coupons active in our store)... so we logged into to phpMyAdmin (our database) and pasted the following code in the SQL field (obviously make sure to change the tablename and tablefield to match your db):
Code:
In our case the code basically searches the xcart_discount_coupons table for a value of 0.00 in the minimum field and replaces it with 72.50 (our minimum order value for any coupons to be applied) so our code looked as such: Code:
PLEASE MAKE SURE TO BACKUP YOUR DB before making any changes! Hope this helps!
__________________
Version 4.1.11 |
|||||||
|
|||
X-Cart forums © 2001-2020
|