get Minimum order value for free delivery from checkout Object STOREFRONT API

kentcabarle
New Member
3 0 0

Hi 

Based on the Shopify Shipping rates & condition, i want to show message .

  • For example, if the shipping profile was set as "Free shipping above AED 200 for delivery within UAE" and the customer has selected UAE delivery address, i want to show  message  show add more 75  if the cart value is AED125 t get free delivery .
  • so i want to be able to get Minimum order value for free delivery from checkout Object is there is way for that ?
0 Likes
TroyTabor
New Member
1 0 0

I am looking for a similar solution, either a message in the checkout OR even better, a popup. I've not yet found a solution but thought I'd let you know my thoughts on how to approach this. There is a bit of code at https://community.shopify.com/c/Payments-Shipping-Fulfillment/Setup-Minimum-order-dollar-amounts/td-... which points to putting an IF statement when a cart is below a specified amount in the checkout where you could code in a message to get to the minimum order. What I will probably do, if I can't find an app to fulfill this need, is to code a block that puts a message above the NOTES field in the checkout, and put a bit of logic that if there is maybe < $10 left then a certain product, if < $25 a certain product. And hopefully put a one-click-add to cart for those...

Something like this maybe:

 

{% if cart.total_price < 25 %}

<div class="cart-near-freeshipping-wrapper">
    <form action="/cart/add" method="post" id="product-form-{{ product.id }}">
        <input type="hidden" name="id" value="{{ product.variants.first.id }}">

        <p>You're nearly there for FREE SHIPPING! Just {{ 50 - cart.total_price }} to go. Add a $25 gift card to your order and you're there!
        <button type="submit" name="add">Add to cart</button>
    </form>
</div>
{% endif %}

0 Likes