0

I'm developing an ecommerce website with Wordpress / Shopify API. I'd like to be able to capture discount codes through the URL.

So if the discount code was code40, I'd like the enduser to be able to go to website.com/code40 and have that discount code automatically feed into the checkout. I've tried a few different methods, but I'm struggling to get a working solution. I have a good idea on how I'm going to feed the variable into checkout, but I'm struggling with capturing the data after the URL. Is this something I should do through HTACCESS/PHP or maybe JavaScript and a cookie? Any suggestions?

New contributor
user3618739 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1

Your Answer

user3618739 is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.