Shopping cart - free shipping weight

Highlighted
New Member
6 0 0

Hey,

 

Can someone help me with a solution for my problem.

 

So I have a webshop where when you buy 24 pieces you have free shipping zo I want to have a message on my shopping cart how much they need to buy more. I tried this code, but he doesn't show the second message (see printscreen).

 

  <h5>
  {% if cart.total_weight < 2400 %}
    <span style="font-weight: 900; color: #9fa615;">Have your eye on anything else?</span> If you spend {{ 24 | minus: cart.total_weight | weight }} more, you qualify for free U.S. shipping!
   {% else %}
    <span style="font-weight: 900; color: #9fa615;">Hooray!</span> Your order qualifies for free U.S. shipping! Enjoy the savings.
  {% endif %}
  </h5>
</div>


Also, is it possible not to show the numbers behind the decimal point. So 1 instead of 1.23 (see printscreen).

 

What's wrong in my code?

 

Extra question: is it possible to show another message for people in onther country?

 

Thanks for the help!

 

Schermafbeelding 2020-04-01 om 10.18.43.png

 

0 Likes
Highlighted
Shopify Partner
297 56 71

Hello @Jensjelmer,

                         share store link for better understanding of the problem

Regards,

Wahab 

0 Likes
Highlighted
New Member
6 0 0

https://drinks-52-webshop.myshopify.com

 

Now 1 product is 0,3 kg, If you buy 7,2 kg (24 products) you have free shipping.

If I can have a message that says you need to buy  xx more bottles, I will change the weight, so that 1 product is 1kg, and if you buy 24 products (24kg) you have free shipping.



 

0 Likes
Highlighted
Shopify Partner
297 56 71

@Jensjelmer, Protected password 

0 Likes
Highlighted
New Member
6 0 0

Sorry, I thought I deactivated it. Now it's deactivated.

0 Likes
Highlighted
New Member
6 0 0
Hi can't answer on your private message so here my answer:
 
 
No, the shipping system is:
  • 24 bottles or more is free.
  • less than 24 bottles you pay 5,5 euro
But, you can only have shipping options per weight or money, so all my products has a weight of 0,3kg and if someone buy 24 products (weight: 7,2kg) they have free shipping.
 
What I want is at the checkout - if they don't have 24 products - a message that they need to buy XX more products to have 24 products.
 
To do that I changed the weight to 1kg/item and 24kg/24items. And i used that code: 
 
 
<h5>
{% if cart.total_weight < 2400 %}
<span style="font-weight: 900; color: #9fa615;">Have your eye on anything else?</span> If you spend {{ 24 | minus: cart.total_weight | weight }} more, you qualify for free U.S. shipping!
{% else %}
<span style="font-weight: 900; color: #9fa615;">Hooray!</span> Your order qualifies for free U.S. shipping! Enjoy the savings.
{% endif %}
</h5>
 
 
But that gave a few problems:
1. Only the first message came on.
2. When you had more than 24 products, this message came on ' If you spend -4 more, you qualify for free U.S. shipping!' instead of 'Your order qualifies for free U.S. shipping! Enjoy the savings.'
3. If all above work, is it possible to have another message (or no message) for other countries.
 
Thanks for the help.
Jens
0 Likes