Magento - Wrong price for custom options

This has been a real pain: Instead of using configurable products for our more complex products, we went ahead and used custom options instead.

However the prices displayed in the frontend are wrong. To be more exact, the correct price is shown in the select list, but when selected, the wrong price is added to the cart and also wrongly updated in the product view.

The weird thing is, that the price added to the products base price is always 2 times higher than expected.

Any idea what is going on here? Any help would be greatly appreciated!

Upvotes: 0

Views: 4098

Answers (2)

daviddukeuk
daviddukeuk

Reputation: 70

I also had this bug on two separate Magento installations running 1.4.x

So Kristian was correct, if you comment out a specific line in the Javascript that appears in:

/httpdocs/app/design/frontend/#YOURTHEME#/#YOURTHEME#/template/catalog/product/view/options.phthml

around line 139, change this:

try {
    optionsPrice.changePrice('options', price);
    optionsPrice.changePrice('optionsPriceInclTax', price);
    optionsPrice.reload();
} catch (e) {

to this:

try {
    optionsPrice.changePrice('options', price);
    //optionsPrice.changePrice('optionsPriceInclTax', price);
    optionsPrice.reload();
} catch (e) {

Upvotes: 1

Kristian Hildebrandt
Kristian Hildebrandt

Reputation: 11

After disabling and then re-enabling a couple of extensions, the problem was fixed in terms of the wrong price being added to the cart.

Subsequently I edited some javascript in /template/catalog/product/view/options.phthml, changing try { optionsPrice.changePrice('options', price); optionsPrice.changePrice('optionsPriceInclTax', price); optionsPrice.reload(); }

to

try { optionsPrice.changePrice('options', price); //optionsPrice.changePrice('optionsPriceInclTax', price); optionsPrice.reload(); }

Problem seems to be fixed, but I have no idea why it occured in the first place.

Upvotes: 1

Related Questions