Adding a product to cart using a discount code in the checkout page

Adding a product to cart using a discount code in the checkout page

MilesLawrence
Tourist
12 1 4

Hi all, part of the functionality of the store we're building is the feature to add (free) specific products to the cart based on a discount code they enter at the checkout page. I can't seem to find a reliable way to do this, but maybe some of you can point me in the right direction or help me get started.

Appreciate any advice you all can offer, cheers!

Replies 2 (2)

PaulNewton
Shopify Partner
6350 582 1355

Ajax cart api; while it is a bit clunky having discount behavior logic in two places scripts only change a line items quantity or price.

 

 

 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


gambler143
Shopify Partner
5 0 2

any luck with this ?