Shopify themes, liquid, logos, and UX
Hi there!
i would like to add a line of shipping rate into the cart drawer. Can someone help?
I dont want to use a app because it should be code.
Shoul be like this:
Price
Shipping price (if price is under 299€ then 4,99€ and if more than 299€ free)
Total Price (sum of Price+Shipping)
Solved! Go to the solution
This is an accepted solution.
Hi,
It's not really that complicated. First, you need to find the cart drawer file, I would dare to say that it's located in the snippets folder, and it must be called cart-drawer.liquid, however, file names depend on your theme.
Open that file and find the place of the HTML doc where you want to place the code so that it renders correctly on screen.
Build the HTML structure and style it with CSS.
Then you may include the LIQUID logic. Would be something like this (not exactly it, but this is how the logic goes):
<div class="container">
<p>price:</p>
<p>{{product.price}}</p>
<p>Shipping Price</p>
<p>{% if product.price < 299 %}{{checkout.shipping_price}}{% elsif product.price > 299 %} Free {%endif%}</p>
<p>Total Price:</p>
<p>{{checkout.total_price}}</p>
<div>
That's it.
Hope that's helpful.
This is an accepted solution.
Hi,
It's not really that complicated. First, you need to find the cart drawer file, I would dare to say that it's located in the snippets folder, and it must be called cart-drawer.liquid, however, file names depend on your theme.
Open that file and find the place of the HTML doc where you want to place the code so that it renders correctly on screen.
Build the HTML structure and style it with CSS.
Then you may include the LIQUID logic. Would be something like this (not exactly it, but this is how the logic goes):
<div class="container">
<p>price:</p>
<p>{{product.price}}</p>
<p>Shipping Price</p>
<p>{% if product.price < 299 %}{{checkout.shipping_price}}{% elsif product.price > 299 %} Free {%endif%}</p>
<p>Total Price:</p>
<p>{{checkout.total_price}}</p>
<div>
That's it.
Hope that's helpful.
Thanks!
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024