On my Magento 1.3 site I have a store view which uses zero decimals for Japanese yen currency
and two decimals for USD currency.
On a Configurable Product page, if a user selects a product attribute from the drop down selector while using Yen,
the currency format for the price changes to two decimal places
(for Yen, obviously not desirable).
Code:
<script type="text/javascript">
var optionsPrice = new Product.OptionsPrice({"productId":"3","priceFormat":{"pattern":"\uffe5 %s","precision":2,"requiredPrecision":2,"decimalSymbol":".","groupSymbol":",","groupLength":3,"integerRequired":1},"includeTax":"false","showIncludeTax":false,"showBothPrices":false,"productPrice":4600,"productOldPrice":4600,"skipCalculate":0,"defaultTax":5,"currentTax":5,"idSuffix":"_clone","oldPlusDisposition":0,"plusDisposition":0,"oldMinusDisposition":0,"minusDisposition":0});
</script>
This is from looking at the page source.
The "precision" declaration is no doubt the problem.
Two questions,
First, this looks like inline JS, so how can i find the template file to edit.
Second, is there a way of telling JS which currency is currently in use so the
precision is set to 0 or 2 accordingly?