Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
is it possible to apply discount codes in the cart, using the StoreFront API?
I've searched a lot for this, but didn't find a proper solution. Maybe create a checkout and modify it via the API?
When I try to call /api/2021-01/graphql.json with jQuery (from the cart liquid template), it gives me CORS error. how can I avoid that?
noone?
I just need to apply discount on the cart with a private app/ or something
If your store has a Shopify Plus Plan, you can apply a discount automatically by using javascript in the checkout.js file.
If not, you can add a discount code as a url paramenter. The discount will be automatically applied when the user reaches the checkout.
We've tried a couple different solutions (including KartDiscount).
KartDiscount essentially does a call to the checkout page and uses selectors to pull the discounted amount. This works for certain stores, but will eventually time the customer out due to Bot like activity.
We ended up just creating our own solution that hosted on our own server which takes in products & calculates the discount based on however you do discounts (tags/collections)
If you have Shopify plus then you can use the script editor for line item discount which will show up on the cart page. If you don't have Shopify plus then you can manipulate the cart page to display a discount and have a script that will auto-applied the discount code at the checkout page.
Hi there! Here's an answer to your question: https://app.hopps.io/videos/how-do-i-apply-a-discount-on-the-cart-page-178663a7e21. If it doesn't make sense or you still have questions, one of the experts can walk you through the solution.
Looks like we couldn't find this video
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024