Personalized checkout and custom promotions with Shopify Scripts
I would like to show my shipping price, lets say 2EUR on my product page in a custom liquid block or an application. This 2EUR should be changing with the customers currency and scaling with it, also it should say free shipping if the customer is in UK or the US.
I have tried this code already, but it just changed the currency symbol and not the actual value of it:
{% comment %}
Get the customer's location based on IP address
{% endcomment %}
{% assign customer_location = request.client_ip | geolocation %}
{% comment %}
Set the currency based on the detected location
{% endcomment %}
{% assign currency_code = customer_location.country.iso_code | downcase %}
{% comment %}
Display the price in the customer's currency
{% endcomment %}
{{ 3.95 | money | append: ' ' | append: currency_code }}
If you want a complete solution, it can't be done with only liquid. Pay attention to my widget: https://apps.shopify.com/shiprate-estimator
If there will be any help with installation - feel free to ask me.
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