Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Any Magento javascript gurus
Old 06-18-2010, 10:11 AM Any Magento javascript gurus
TWD
TWD's Avatar
King Spam Talker

Posts: 1,190
Trades: 0
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?
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals"
Please login or register to view this content. Registration is FREE
TWD is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Any Magento javascript gurus
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.97163 seconds with 12 queries