gkiwi
gkiwi

Reputation: 610

magento1.9: when i create new custom option, i can't save the option price

I create one new Custom Options called 'image',everything works will,but when I save the product , the 'price' and 'price type' can't been saved, and SKU can been saved;

the $option:

(
[is_delete] =>
[previous_type] => image
[previous_group] => image
[id] => 3
[option_id] => 3
[title] => title
[type] => image
[is_require] => 1
[sort_order] => 0
[price] => 20000.00
[price_type] => fixed
[sku] => 22222222
)

when i change the $option['type'] to 'field' or other default type (on Mage_Catalog_Model_Product::_beforeSave),'price' and 'price_type' can been saved. I have try many solution but always failed:(

Upvotes: 0

Views: 1240

Answers (1)

gkiwi
gkiwi

Reputation: 610

I have got the reason.

On app/code/core/Mage/Catalog/Model/Resource/Product/Option.php->_saveValuePrices, it check the custom options type,so I just rewrite this model,add image type support in _saveValuePrices and fix this problem:)

Upvotes: 1

Related Questions