2

I am building an online store.

I wanted a functionality like following:

There are more than one custom prices for a product. Each custom option has a fixed price. These fixed prices from respective custom prices add to the base price. There is one more(last) custom price: Adding percentage to the final price.

To add the percentage increase to the final price and not the base price, I changed the code on the following file:

app/code/core/Mage/Catalog/Model/Product/Type/Price.php FILE MODIFIED: Price.php

Line 343, 344

original code:

$finalPrice += $group->getOptionPrice($confItemOption->getValue(), $basePrice);

new code:

$finalPrice += $group->getOptionPrice($confItemOption->getValue(), $finalPrice);

It works perfectly!

The only thing is that the percentage price is added to final price only on check out page and not on the product page itself(i.e. when I select the % addition on product page).

I think it has to be done with JavaScript.

  • Have you got any solution for this on magento 1.9? – Syed Ibrahim Apr 30 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.