Add a gift product based on discount code

New Member
1 0 0


I am trying to add a discount code in the admin panel to "FREEGIFT" buy x get y, so when the customer add any product in the cart, he can proceed to the checkout page where we have the Discount code field, but my issue is, in Shopify the customer needs to add both x and y to the cart in order to get the discount code, which is not working for me. So, what i was trying to do is, editing the checkout page to get the input value, if it is equal to "FREEGIFT" then add the gift product to the cart page. But i figured out that we can't access the checkout page code or add any javascript code. So what do you suggest? i appreciate any help.

Thank you in advance.

40 0 18

Hi @err404!

How about an upsell app? KAD Upsell & Cross Sell is a great tool for above mentioned case. 

It will allow you to create discounted offers that will be shown to your customers on the fully customizable banner. Products on this baner can be with % discount, free or full price. After offer created it will generate a discount code which name you can change to any necessary one. 

You can learn more here or by contacting me

Let me know what you think.