All Collections
Smart Cart
Announcements & Free Shipping
Update Tiered Progress Bar unlock prices to match the current currency
Update Tiered Progress Bar unlock prices to match the current currency

How to adjust TPB minimum amounts based on the chosen currency

Jason Khan avatar
Written by Jason Khan
Updated over a week ago

Before proceeding, ensure that you have constructed your tier progress bar according to the instructions provided in our helpful guide.

How the Tiered Progress Bar Unlock Prices works

Currently, you simply add the dollar amount you want each tier to unlock at (add a product if using a free product tier) and click save.

As of October 2023 these amounts do not adjust based on the selected currency. The tier will show as unlocked once the subtotal reaches the Unlock Price, in any currency.

Example: Your store's default currency is USD and you set free shipping to unlock at $900. A customer on your store switches their currency to AUD and adds $900 of items to the cart. $900 AUD is less than $900 USD however the free shipping tier will still show as unlocked.

How to allow the Tiered Progress Bar minimum amounts to update for each currency

Using the code shown below, the Tiered Bar Unlock Prices will automatically adjust as customers change currencies.

Example: If a customer switches to AUD, the tiered bar will show an increased Unlock Price, to account for $900 AUD being less and $900 USD

Note: The conversion amount used is coming directly from Shopify. It may not match the currency amount you'd prefer to use or what google currency conversion might show you.

To confirm the currency amount Shopify is using, you can paste

Shopify.currency

into your console.

See image below.

Add this code to the Smart Cart > Advanced > Ready box

/* Updated TPB minimum prices to the current currency */
function makeTieredBarConvertCurrency() {
setTimeout(() => {
/* check if the currency has been changed from store default */
if(Rebuy.shop.currency !== Shopify.currency.active) {
/* access the TPB tiers and convert the minimum to the new currency via the Shopify rate */
Rebuy.SmartCart.progressBar.tiers.forEach(tier => {
/* current minimum as set in TPB setting */
const currentMinimum = tier.minimum;
console.log(Shopify.currency.active, Shopify.currency.rate)
/* converts original amount using the conversion rate from Shopify, rounded up */
tier.minimum = Math.ceil(currentMinimum * Shopify.currency.rate);
})
}
}, 500)
}
makeTieredBarConvertCurrency() //runs on each page load

The end result will look like this. The customer has changed the currency to AUD and the Tiered Bar Unlock Price for free shipping has updated from the $900 set in the Rebuy Admin to $1,447.59 because that is the converted amount using the currency rate from Shopify.

FAQS

Q: Do Rebuy widgets function with Shopify Markets?

  • Yes, Rebuy widgets and features are designed to seamlessly integrate with Shopify Markets and multiple currencies. The compatibility ensures that you can enhance your Shopify store's functionality and user experience by incorporating Rebuy widgets. These widgets work in conjunction with Shopify Markers, allowing you to optimize and personalize the shopping experience for your customers.

Did this answer your question?