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 %}


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

  2. This comment has been removed by the author.

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

  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.

  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

  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

  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