Price refresh script (Is it required)??

New Member
5 0 0

Hi all,


I am using the Minimal theme.


I have installed the shopify currencies picker by following this tutorial:


I then setup wholesale discounts without an app using this tutorial:


All worked perfectly with the exception of the price shown on the Product Page.

The wholesale altered price would only flash up for a second and then revert back to the original unmodified product price.


After much searching I found that the culprit was a small piece of script in the theme.js file:


// Regardless of stock, update the product price
 Shopify.formatMoney(variant.price, moneyFormat)


I commented this out and the price now stays modified on the Product Page and seems to show up fine everywhere all the way through to the checkout.


My questions are:

1) Is this piece of code required for anything that I am missing?

2) Will removing it cause any behind the scenes issues?

3) What is this code for?  Why would the price need refreshing via Javascript?


Thanks for your help and comments.