Hire a web Developer and Designer to upgrade and boost your online presence with cutting edge Technologies

Friday, January 1, 2016

Shopify – Auto fill discount code on checkout page

Locate this line of code in your cart.liquid template

<form action="/cart" method="post" id="cart">

Directly below that line of code you need to place something like this

<input type="hidden" name="discount" value="RESELLERDISCOUNTCODE" >

Where “RESELLERDISCOUNTCODE” is your discount code.

If you want apply this to only a specific group of customers. you can use tags to create a customer group and then only apply the code to customers who are in that group.

{% if customer.tags contains 'RESELLER' %}   <input type="hidden" name="discount" value="RESELLERDISCOUNTCODE" >   {% endif %}

9 comments:

  1. Thank for sharing information. this will really help me to develop shopify websites

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. A personal course includes the establishment of a professional store accompanied by personal training and professional consultation. shopify

    ReplyDelete
  4. This article is an appealing wealth of informative data that is interesting and well-written. I commend your hard work on this and thank you for this information. You’ve got what it takes to get attention. discountbro.com

    ReplyDelete
  5. thanks consequently a good deal as you've got been willing to pension guidance taking into account us. we are able to always appreciate every and every and each one in all one one allowance of allocation of you have completed here because you've got made my take impact as clean as ABC. Auto Service Deals

    ReplyDelete
  6. Pretty nice post. I just stumbled upon your weblog and wanted to say that I have really enjoyed browsing your blog posts. After all I’ll be subscribing to your feed and I hope you write again soon! Shopify Developers

    ReplyDelete
  7. Logo will speak to your corporate personality and clients will remember you through it. In this way, to establish a decent first connection, attempt to make an extraordinary and alluring logo.logo design service

    ReplyDelete
  8. It turns out that even the hottest port has a few places where you can get off the beaten path. Here are some recommendations that will make you feel like you're in the know txtcartapp

    ReplyDelete
  9. Very interesting information, worth recommending. However, I recommend this: Is VigRX Plus worth the money

    ReplyDelete