Jump to content

Ajaxcart checking promocode validity for a product


Webmaster001

Recommended Posts

We have an ajaxcart. It seem the any promocode (coupon) can be applied to the cart. For example for Pro1 there is a coupon code of DEMO. When we apply that to Product2 it still gets applied although it doesn't change the actual pricing but it doesn't also give any warning to the clients.

 

The comparison cart is calling {$LANG.promoappliedbutnodiscount} but ajax cart doesn't. It seems we need to edit our cartsummary.tpl somehow to make sure that is applied. Any suggestion?

Link to comment
Share on other sites

for ajaxcart, you would edit cartsummary.tpl with the following:

 

<div class="subtotals" id="promocodeholder">
{if $promotype}
{if $promotioncode && $rawdiscount eq "0.00"}{$LANG.promoappliedbutnodiscount}{else}
{$LANG.cartpromo}: {$promovalue}{if $promotype eq "Percentage"}%{elseif $promotype eq "Fixed Amount"}{/if} {$promorecurring}{/if}
<br />
<a href="#" onclick="removepromo();return false">{$LANG.cartremovepromo}</a>
{else}
<input type="text" id="promocode" size="20" style="font-size:9px;" value="{$LANG.cartenterpromo}" onfocus="if(this.value=='{$LANG.cartenterpromo}')this.value=''" /> <input type="button" value="{$LANG.go}" style="font-size:9px;" onclick="applypromo()" />
{/if}
</div>

Edited by brian!
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated