Hi,
Im using DAWN theme and I try to add a notification in the cart for customers to get notified if they add 1 more product to the cart they get x % amount of discount.
Can I do this with coding?
Hi,
Im using DAWN theme and I try to add a notification in the cart for customers to get notified if they add 1 more product to the cart they get x % amount of discount.
Can I do this with coding?
Hi,
This is Richard at PageFly - Shopify Advanced Page Builder app.
You can add this to your main-cart-items.liquid file:
{% if cart.item_count == 4 %}
<h2 class="title title--primary">
Add 1 more product to the cart to get an x% discount!
</h2>
{% endif %}
Replace 4 with the amount of items the customer needs in their cart to get the discount, minus 1. So in the code example above, the customer would be getting a discount at 5 items.
I recommend pasting this just below the {% if cart != empty %} line.
Hoping my solution helps you solve your problem.
Best regards,
Richard | PageFly
Hi @myhope
Definitely able to use the code. Follow the instructions below
From the Admin page, go to Online Store > Themes
Select the theme you want to edit, click the three dots to edit code
Under the Section folder, open the main-cart-items.liquid
Then place the code below at line 36 after the , see image below for placement
NOTE: Change the text, “Add 1 more product to get a discount”
### Add 1 more product to get a discount
See the placement here:
Result:
Thank you for the reply Richard
just 1 more thing, will this reset the message (or remove) when there are 2 or more items in the card without refreshing the page?
Thank you for the reply Richard
just 1 more thing, will this reset the message when there are 2 or more items in the card without refreshing the page?