How to use absolute pricing for custom options

Last modified by gpcola on Fri, June 25, 2010 09:54
Source|Old Revisions  

This is an old revision of the document!


When giving a custom option a price, Magento adds that price to the product’s base-price. This entry will show you how to add an extra price type, that allows custom options to override the base price. So instead of having “+ 10 percent” or “+£10 fixed”, you would be able to have “£25 absolute”.

Step 1

Edit app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Price.php


  1. array('value' => 'percent', 'label' => Mage::helper('adminhtml')->__('Percent'))


  1. array('value' => 'percent', 'label' => Mage::helper('adminhtml')->__('Percent')),
  2. array('value' => 'absolute', 'label' => Mage::helper('adminhtml')->__('Absolute'))

Step 2

Edit app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Options.php


  1. } elseif ($type == 'fixed') {


  1. } elseif ($type == 'fixed' || $type == 'absolute') {

Step 3

Edit app/code/core/Mage/Catalog/Model/Product/Type/Price.php.

Replace all occurrences of:

  1. $finalPrice += $this->_getPricingOptionValue(array(


  1. $finalPrice = ($option->getValueById($optionValue)->getPriceType() != 'absolute' ? $finalPrice : 0) + $this->_getPricingOptionValue(array(


You may need to also edit your frontend design accordingly to signify these changes.

Problem: I can’t locate that exact line of code in step 3, are you sure that is the correct code to look for? The closest I find is $finalPrice += $group→getOptionPrice($quoteItemOption→getValue(), $basePrice);

Please be more exact on step 3 code replacement. Thanks!

Yeah, Please be more specific of the last step...this would be an awesome feature to have. Thanks,

Captive Design

I tried to work around it with the fixed price values hack posted here however, it appears like the price.php file has changed in how it handles calculating option prices as of version (feel free to correct version as needed- its the first time I noticed it in my files though).



This would be the best and most useful Wiki EVER, if it actually worked....step 3 code does not exist. Hopefully someday, someone can figure this out, as it is an ABSOLUTE NECESSITY FOR ANY WEBSITE. CAN’T BELIEVE IT’S NOT ALREADY PART OF MAGENTO....ALL THE OTHER CARTS HAVE A ‘ONE TIME FEE’ OPTION...ZENCART...ETC.... WHAT’S UP MAGENTO?? CHRIS

I’ve been checking back to this post everyday hoping and praying that someone had updated that last piece of code to get this working! I think this is one of the most important modifications that has been left out to date! Magento, please take a look at this!! We need to be able to have absolute pricing for custom options since your Grouped products do not allow for custom options. Thanks! -Andrew

Hoping and praying that someone will respond - Kit - July 27th 2009


look here (alpha)


-gpcola 12/11/2009:

I got to step three of modifying my store only to realise that step 3 is not applicable to Not a great state of affairs I have to say :(