A client was complaining about the fact that it's not immediately obvious what's happened if you submit a coupon in the XC checkout process. So...here's a
small template mod to make things a bit more 'tactile' when taking coupons. Shots below highlight what happens with this mod:
Usual stuff - back up before modifying anything, etc
Before entering coupon
(note: our coupon.tpl has been moved to the top)
http://www.ocpx.com/temp/coupon_before.gif
After entering coupon
(note: there's an assumption here that you can only enter one coupon in the XC checkout - certainly the case with our install of 4.016, but if anyone knows any diffently, please shout)
http://www.ocpx.com/temp/coupon_after.gif
Tpl changes required to implement this:
1. Goto skin1/modules/Discount_Coupons/add_coupon.tpl
2. Create an {if} statement to wrap around your 'this coupon's been taken' content.. - create your lang vars if you're not as lazy as me.
3. At the end of your 'coupon taken element, add an {else}, followed by your 'default' add_coupon.tpl
4. Close the {/if}.
For example:
Code:
{if $cart.coupon_discount ne 0 and $cart.coupon_type ne "free_ship"}
...
...
Your coupon has been taken and {include file="currency.tpl" value=$cart.coupon_discount} has been deducted below.
..
..
{else}
{capture name=dialog}
<TABLE width="706">
<TR>
<TD colspan="4"><LI>{$lng.lbl_bullet_coupon}</LI></TD>
</TR>
<TR>
<TD colspan="3"> </TD>
</TR>
<FORM action="cart.php" name="couponform">
<TR>
<TD width="152">{$lng.lbl_coupon_code}:</TD>
<TD width="542">
<INPUT type="text" size="32" name="coupon" class="inputfield">
</TD>
</TR>
<TR>
<TD width="152"></TD>
<TD width="542">
<input type="submit" class="secondarybutton" value="{$lng.lbl_use_this_coupon}">
</TD>
</TR>
<INPUT type="hidden" name="mode" value="add_coupon">
</FORM>
</TABLE>
{/capture}
{ include file="dialog_COUPON.tpl" title=$lng.lbl_discount_coupon content=$smarty.capture.dialog extra="width=100%" }
Hope that's useful.
Cheers,