问题
I'm using Magento 1.7.0.1
just recently upgraded from 1.6.2.0
. I have the SCP extension as well as MageWorx Advanced Custom Options.
I have a configurable product where the simple products that are associated have custom options.
If you select the drop-downs in the following combination you will see the multi-select popup with the custom options available. Just before the custom options box pops up it will switch from £99.99 (correct) to £0.00. Oddly, if you click a custom option then click "Add to Cart" it recognises this and adds it to cart with the custom option and the correct pricing!
The combination is as follows:
- A6
- 5000
- 300gsm Gloss
- 24hrs
You will see it briefly switch to £99.99 then revert to £0.00. This is where the problem lies. If anyone can provide some assistance that would be great. I've tried the obvious fixes such as editing the price += float in options.phtml (doesn't exist anyway!) and ensuring I have an options.phtml in my theme folder. I've also modified the price_clone as that has also been reported to fix this, but doesn't in my circumstance.
Many thanks
回答1:
Try this, this works for me...
in app/design/frontend/base/default/template/catalog/product/view/options.phtml
change
price += parseFloat(config[optionId][element.getValue()]);
to
price += parseFloat(config[optionId][element.getValue()].price);
for more detail refer
http://k2xl.com/wordpress/custom-options-broken-in-magento-1-7-heres-the-fix/
or
http://www.magentocommerce.com/boards/viewthread/280283/P0/
回答2:
i use this fix for magento 1.9
https://github.com/lejoko/magento-configurable-simple/blob/2d70ea083a44bf1608af95f1ba6f07754729f334/app/design/frontend/base/default/template/catalog/product/view/scpoptions.phtml
回答3:
In app\design\frontend\base\default\template\catalog\product\view\options.phtml
Find the code,
Product.Options = Class.create();
Product.Options.prototype = {
//Don't change this code,
}
Add the below code after this,
price += parseFloat(config[optionId][element.getValue()].price);
来源:https://stackoverflow.com/questions/11296457/magento-1-7-0-1-resets-price-to-0-when-using-custom-options