Hello,
Is it possible to calculate product custom option prices to 4 decimal places?
Example: My store will sell 10,000 business cards for 0.0089 per card.
I am new to Magento, and so far I'm impressed, but I can't believe Magento does not have this functionality!
If would really appreciate if anybody has any advice on this
For this you need to change the default magento decimal place count. This will help you with it. http://magento.stackexchange.com/questions/36600/remove-precision-from-price-of-a-product
Thank you for your suggestion. It works on the base price, but not for custom options, any ideas?
Check in the .js file of the Custom Options.
Do you know tha file-path for that file? Sorry I'm only starting my Magento journey it would be a needle in a haystack for me!
You can find the file on the below path:
Magento-Root/js/varien/product.js
Thanks, I'm still at a loss here I've no experience with js, I've tried some suggestions on other forums but I'm afraid I'll cause problems messing with the file. Do you know how I should edit this file to get the desired results?
Sorry for bothering you with all of these questions.
Ok, I've tried changing:
formatPrice: function(price) {
return formatCurrency(price, this.priceFormat);
}
TO:
formatPrice: function(price) {
this.priceFormat.requiredPrecision = 4;
return formatCurrency(price, this.priceFormat);
}
This sollution only changes the decimals on the fontend, but I need it on the backend so that I can calculate prices like: 0.0089 etc. Any ideas?
UPDATE:
The problem is that the decimals do not show for Tier prices.
The guys who developed the Extension Currency Manager extension say:
"Why isn't your extension working in admin panel for tier prices?
The output for these prices is working in a different way - it doesn't use formatting functions. Template app\design\adminhtml\default\default\template\catalog\product\edit\price\tier.phtml contains hardcoded formatting with 2 decimals (sprintf('%.2f', $_item['price'])). But we don't want to replace the whole big template just to fix this one small thing. More importantly, this template may differ from one Magento version to another or in non-standard themes for admin panel.
So it is easier to just let you edit this template yourself, if you want."
I have changed (sprintf('%.2f', $_item['price'])) TO (sprintf('%.4f', $_item['price'])) but this does not have any effect.
Maybe somebody has a solution?
Hi
This is possible to do. If you aren't across Magento then I suggest you outsource this to a developer. I know a few developers who do this. Let me know if you want their details.
Cheers
Carolyn