It's Easy to Integrate Coupon Codes - June 25, 2009

Following up with yesterday's lesson on setting up coupon codes, today we'll show you the code to accept coupon codes. Once you've set up your Coupon Code in the backend, all you need to do is add a simple code snippet to your store's page:

 Special Offer code applied.
   If you have a Special Offer Code, enter it here and click Apply: <v:text_field name="discount" />
   <input type="submit" value="Apply" />

We used the <v:store:if_discount> and <v:store:discount> tags to allow the user to input a coupon code. Lets see how this renders:

After entering our 2buxoff coupon code (that we created yesterday), we can see the discount is reflected in the total: