Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Setting Discount Coupon to expire beyond 31/12/2003

 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #1  
Old 11-03-2003, 11:20 AM
 
parmar parmar is offline
 

eXpert
  
Join Date: Apr 2003
Location: London, UK
Posts: 268
 

Default Setting Discount Coupon to expire beyond 31/12/2003

I'm setting up a Discount Coupon for one of our partners. X-Cart date range in Coupon setting only goes up to 31/12/2003. How will I be able to extend that beyond end December 2003? Or Will I have to wait until the New Year and re-issue the coupon?
__________________
--------------------
Sandip

http://www.holdersandmounts.co.uk/

x-cart version 4.7.6
Reply With Quote
  #2  
Old 11-03-2003, 11:29 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

New code for modules/discount coupons/coupons.tpl
version 3.4.x - did this today for another client


Code:
{* $Id: coupons.tpl,v 1.10 2003/04/22 10:10:59 svowl Exp $ *} {include file="location.tpl" last_location="Store coupons"} {include file="main/popup_product_js.tpl"} This page allows you to define coupons that you wish to accept for your store. Each coupon allows a customer to receive a discount when he/she orders products from your store. If a customer enters a valid coupon code during checkout, the store will deduct the discount amount from their order total. {capture name=dialog} {if $coupons ne ""} <table width="100%" border=0> <form action="coupons.php" method="POST"> <tr><td class=TableHead>Coupon</td><td class=TableHead>Status</td><td class=TableHead>Disc.</td><td class=TableHead>Min.</td><td class=TableHead>Times</td><td class=TableHead colspan=2>Expires</td></tr> {section name=prod_num loop=$coupons} <tr> <td> {$coupons[prod_num].coupon} </td> <td> <select name="status-{$coupons[prod_num].coupon}"> <option value=A {if $coupons[prod_num].status eq "A"}selected{/if}>Active</option> <option value=D {if $coupons[prod_num].status eq "D"}selected{/if}>Disabled</option> <option value=U {if $coupons[prod_num].status eq "U"}selected{/if}>Used</option> </select> </td> <td>{if $coupons[prod_num].coupon_type eq "absolute"}{include file="currency.tpl" value=$coupons[prod_num].discount}{elseif $coupons[prod_num].coupon_type eq "percent"}{$coupons[prod_num].discount}%{else}Free ship.{/if}</td> <td>{include file="currency.tpl" value=$coupons[prod_num].minimum}</td> <td align=center>{$coupons[prod_num].times_used}/{$coupons[prod_num].times}</td> <td nowrap> {$coupons[prod_num].expire|date_format:"%b/%d/%Y"} </td> <td><input type="button" value="Delete" onClick="document.location='coupons.php?mode=delete&coupon={$coupons[prod_num].coupon}'"></td> </tr> <tr> <td colspan=7> This coupon applies on orders {if $coupons[prod_num].productid ne 0} which contain product #{$coupons[prod_num].productid} {elseif $coupons[prod_num].categoryid ne 0} which contain product(s) from category #{$coupons[prod_num].categoryid} {else} greater than {include file="currency.tpl" value=$coupons[prod_num].minimum} {/if} </td> </tr> {/section} <tr> <td></td><td colspan=5><input type=submit value="Update"></td> </tr> </form> </table> <hr size=1 noshade> {/if} <font class=AdminTitle>Add new coupon</font> <form action="coupons.php?mode=update" method="POST" name=coupon_form> <table border=0> <tr><td>Coupon # <font class="Star">*</font></td><td><input type=text size=24 name=coupon_new></td></tr> <tr><td>Times to use</td><td><input type=text size=8 value="1" name=times_new></td></tr> <tr><td>Status</td> <td> <select name=status_new> <option value=A>Active</option> <option value=D>Disabled</option> </select> </td></tr> <tr><td>Discount</td><td><input type=text size=24 name=discount_new value="0.00"></td></tr> <tr><td>Coupon type</td> <td> <select name=coupon_type_new> <option value=absolute>{$config.General.currency_symbol} off</option> <option value=percent>% off</option> <OPTION value=free_ship>Free shipping</OPTION> </select> </td></tr> <tr><td>Expires</td> <td> {math equation=year+1 year=$config.Company.end_year assign=endyear} {html_select_date prefix="new_" start_year=$config.Company.start_year end_year=$endyear month_format="%b"} </td></tr> <TR> <TD valign=top>Apply to</TD> <TD> <table border=0> <tr><td valign=top><INPUT type=radio name=apply_to value="any" checked></td><td>order total, {$config.General.currency_symbol} <input type=text size=24 name=minimum_new value="0.00"></td></tr> <tr><td valign=top><INPUT type=radio name=apply_to value="product"></td><td>one product <INPUT type=hidden name=productid_new><INPUT type=text disabled size=24 name=productname><INPUT type=button onClick="javascript:popup_product('coupon_form.productid_new','coupon_form.productname');" value="Browse"></td></tr> <tr><td valign=top><INPUT type=radio name=apply_to value="category"></td><td>one category <SELECT name=categoryid_new> {section name=cats loop=$allcategories} <OPTION value="{$allcategories[cats].categoryid}">{$allcategories[cats].category}</OPTION> {/section} </SELECT> </td> </tr> </table> </table> <input type="submit" value="Add coupon"> </form> {/capture} {include file="dialog.tpl" title="Store coupons" content=$smarty.capture.dialog extra="width=100%"}
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 11-03-2003, 04:54 PM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default here an easy fix to correct 2003 dates

Change this line in your config.php


$config["Company"]["end_year"] = 2010;

change the date (2010) field to whatever you want...



Michael
http://www.lingerieblowout.com
Reply With Quote
  #4  
Old 11-05-2003, 12:22 AM
 
parmar parmar is offline
 

eXpert
  
Join Date: Apr 2003
Location: London, UK
Posts: 268
 

Default

Thank you guys.
__________________
--------------------
Sandip

http://www.holdersandmounts.co.uk/

x-cart version 4.7.6
Reply With Quote
  #5  
Old 11-05-2003, 09:46 AM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default No Problem

Glad we can help...
Reply With Quote
  #6  
Old 11-25-2003, 10:32 AM
 
turtle turtle is offline
 

Member
  
Join Date: Sep 2003
Posts: 23
 

Default

Funkydunk's code works perfectly, and I think will increase the year to 2005 as the calendar rolls into Jan 1, 2004, etc for following years.
Reply With Quote
  #7  
Old 12-08-2003, 02:05 PM
 
boxerbay boxerbay is offline
 

Senior Member
  
Join Date: Nov 2002
Posts: 170
 

Default

i have xcart 322 and this does not work for me. I changed the tpl file but now the year shows as just a zero with no option to change it.

HELP
__________________
Thanks,
Alex.
Too many version to list. I have some on 3.51 and some on the latest version.
Reply With Quote
  #8  
Old 12-08-2003, 02:13 PM
 
boxerbay boxerbay is offline
 

Senior Member
  
Join Date: Nov 2002
Posts: 170
 

Default

i hate when i do that. I post then 5 minutes later a i figure it out on my own. In coupon.tpl just edit the line where it shows 2003 as the expiration. I set mine to 2005.

{html_select_date prefix="new_" start_year=2001 end_year=2005 month_format="%b"}

Hope that helps.
__________________
Thanks,
Alex.
Too many version to list. I have some on 3.51 and some on the latest version.
Reply With Quote
  #9  
Old 12-09-2003, 10:52 AM
  leon's Avatar 
leon leon is offline
 

X-Wizard
  
Join Date: Mar 2003
Location: Costa Rica
Posts: 1,213
 

Default

It happens to all of us at some point, first we get frustrated with some minor change, then we find out right after posting.

Although in bigger issues, even though you could find a way around it is recommended to post (IMHO), since you have alot of points of view and new information that could help you out.
__________________
It doesn\'t matter what is done... it is how it is done.
=============================
XCart Version: 3.5.3 -> Dmcigars.com
XCart Version: 4.1.3....
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:20 PM.

   

 
X-Cart forums © 2001-2020