NEW -- Add Discount Field On Shopify Cart Without Apps [LATEST UPDATE]
Mohamed El-Ghorfi
Shopify Frontend Developer | Shopify Apps | Advanced Themes Customization | Shopify Expert Consultant |
This Article is Originnaly Posted on Medium.
Many of you has read my previous article regarding adding Discount Field On Shopify Cart Without using an application (Below the link if you haven’t read it?yet).
Later on, Shopify released a new update changes on how they handle their checkout, that’s why for some stores that method couldn’t work. I am sharing with you today a new way that will work for these stores.
For more details, read my Other article.
The first thing we need to do is to locate the liquid file that contains the code of your cart page.
#Locate Cart?Template
{% render 'snippet-gf-discount-code-updated' %}
#Create Snippet?File
That’s it, now you can go to the cart page and test your discount form.
One last thing you need to do, on the JS code, change the totalCartSelector to match your theme.
PS: If this method doesn’t work for your store, try the other method I shared before. Else, you can reach out to me, so I can help you!
Again, this is just to make it work for you, you can still refactor the code and adapt it to your needs.
领英推荐
#Video Tutorial
#Video Demo
#Useful resources
So, this is the end of our article today, I hope you learned something from it.
Have a wonderful, great day. Don’t hesitate to contact me if you have any questions. If you face any issues with adding it, you can reach out to me.
Follow me for?more:
Founder at Fenris Workshop
7 个月Hi, You mention at the end of your article to change the JS selector, do you have steps available for that as well? Thank you