Configure Product :
Base Price :Rs.1000
Size : Small - 1500 Size : Medium - 2000
instead of increment with base price, want to replace this to main price
checked few solution but nothing is working with Magento version 1.9
Thankyou
Configure Product :
Base Price :Rs.1000
Size : Small - 1500 Size : Medium - 2000
instead of increment with base price, want to replace this to main price
checked few solution but nothing is working with Magento version 1.9
Thankyou
This is performed by javascript. You need to modify the method getOptionLabel in js/varien/configurable.js
The first few lines of the method look like this:
getOptionLabel: function(option, price){
var price = parseFloat(price);
You need to change it to:
getOptionLabel: function(option, price){
var basePrice = parseFloat(this.config.basePrice);
// 'price' as passed is the RELATIVE DIFFERENCE. We won't use it.
// The ABSOLUTE DIFFERENCE is in option.price (and option.oldPrice)
var absoluteDifference = parseFloat(option.price);
var absoluteFinalPrice = basePrice + absoluteDifference;
// var price = parseFloat(price);
var price = absoluteFinalPrice;
To remove + and - symbols in the options, find call to this.formatPrice function and change the second paramter to false in each call.
Just like this:
if(price){
if (this.taxConfig.showBothPrices) {
str+= ' ' + this.formatPrice(excl, false) + ' (' + this.formatPrice(price, false) + ' ' + this.taxConfig.inclTaxTitle + ')';
} else {
str+= ' ' + this.formatPrice(price, false);
}
Remember, if you make changes in core magento files, then next time you upgrade Magento you will probably lose your changes. Better to create another file like js/varien/custom_configurable.js or whatever name you like, and call it in the config file (product.xml) for whatever theme you are using.
That's all.
Note: This method is not tested on Magento version >1.7