So shopify wants to hide the discount code entry in the order summary during checkout on mobile which is massively stupid, especially considering there’s posts about this going back several years… That said, I’ve not found any of them to be super useful.
Does anyone have a fix for this?
Either adding a discount code field in the shopping cart (probably ideal), or making the order summary visible by default.
Prompt for discount on /cart page and apply it with the discount parameter ?discount=
Or make automatic discounts that fit with what your mobile audience tends to buy.
Latter isn’t possible. Former is promising, how is that done?
Either add it as a link /cart?discount_code=CODE, or make a form with an input box that submits it to /cart
The latter is possible just not 100% foolproof by knowing your audience using analytics ,reports ,channels, etc then create an automatic discount to suit.
Make a collection with products more likely to be bought by mobile users than desktop users, etc.
Example if product A is sold on Facebook and most facebook traffic is mobile discount that product and probably remove it from the online store channel to lower change of desktop users getting discount.
https://help.shopify.com/en/manual/discounts/automatic-discounts
Automatic discounts is not an option.
How do I prompt for a discount code in the cart and pass the value to the URL string?
I’ve added:
But not sure where to go from there.
update previous post for clarity tried to see if I had a snippet or shopify had a tutorial /shrug
If you use an input you need to put in a form to submit the cart, and it needs to submit as a parameter not a cart attribute
{% assign DISCOUNT_CODE = "???" %}
If you place this anywhere besides the cart page and need to stay on the page you either need to use the ajax api, or use the return_to parameter to redirect from the cart back to the original page.
Other cart template info https://shopify.dev/docs/themes/theme-templates/cart-liquid#going-to-checkout
https://community.shopify.com/c/Shopify-Design/Cart-Use-permalinks-to-pre-load-the-cart/td-p/613702#:~:text=Applying%20a%20discount