Cart    Account    Contact    Newsletter Signup    Showcase    Login    Signup

Developers Docs

Promo Form

The promo form tag is a tag pair that wraps the content in form that will validate or remove a promotion code.

  • form (optional | Default = 'Yes') - Specifies whether to return the tag inside a <form></form>

To validate a coupon code simply provide an input field inside the tag pair that has the name "code". The form will automatically post, validate the code, and return the user to the cart. 

To remove a coupon code provide a hidden text field with the name "code" and a value of remove. The form will automatically remove any current promotion codes and return the user to the cart. 

Example from Blank template: (file: cart/index) 

PROMO ENTRY FORM:

{exp:brilliant_retail:promo_form form="no"}

   <label>Discount Code:</label>
   <div class="code">
    <input class="txtinp" name="code" value="{coupon_code}" type="text" />
     <div class="btn">
      <p>Apply</p>
       <input name="" type="image" src="{theme}/images/0.gif" alt="Apply" />
     </div>
   </div>
{/exp:brilliant_retail:promo_form}
 
REMOVE A PROMO:

{exp:brilliant_retail:cart_discount}
   <p>SubTotal: {subtotal}</p>
   {exp:brilliant_retail:promo_form}
      <div class="remove">
      <p class="discount">Discount: ({discount})</p>
      <input type="hidden" name="code" value="remove" />
      <div class="btn">
         <input name="" type="image" src="{theme}/images/remove.jpg" alt="Remove" />
      </div>
     </div>
     <div class="clearboth"><!-- --></div>
   {/exp:brilliant_retail:promo_form}
{/exp:brilliant_retail:cart_discount}

Comments

Add Your Comments


You must be logged in to comment.