- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
By default the attributes calculate percentage off the base price of the product.
Base Price = $10
custom Option 1 = $10
custom option 2 = 10%
Default magento calculation for custom options is
Baseprice + custom option1 + custom option2
$100 + $100 + (10% of $100[Base price]) = $210
But i want to calculate percentage based price from total price not from base price.
I need Like this
Baseprice + custom option1 + custom option2
$100 + $100 + (10% of $200[Baseprice + custom option1]) = $220
Does anyone knows how to solve this?
I suspect we’d need to see the code that generates the original calculation.
I can get the desired results here of calculating percentage based on the changed price value rather than the base price by changing this line of code in app/code/core/Mage/Catalog/Model/Product/Type/Price.php to $finalPrice instead of $basePrice
from this:
$finalPrice += $group->getOptionPrice($quoteItemOption->getValue(), $basePrice);
to this:
$finalPrice += $group->getOptionPrice($quoteItemOption->getValue(), $finalPrice);
But No use