Re: Add a gift product based on discount code

Add a gift product based on discount code

err404
New Member
5 0 0

Hi,

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.

Replies 2 (2)

EmmaSmth
Explorer
45 0 19

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 https://apps.shopify.com/kad-upsell or by contacting me

Let me know what you think. 

err404
New Member
5 0 0

Hi @EmmaSmth ,

Thank you for your reply.

This issue has been resolved, i added a custom discount code field in the cart page, and i created a condition for this specific discount code.