Magento 1.7.0.1 resets price to 0 when using custom options

独自空忆成欢 提交于 2019-12-06 03:32:05

问题


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:

  1. A6
  2. 5000
  3. 300gsm Gloss
  4. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!