Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6199827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:15:27+00:00 2026-05-24T04:15:27+00:00

I have a configurable product with 3 options, see below: I want to replace

  • 0

I have a configurable product with 3 options, see below:

enter image description here

I want to replace the +£24.00 and the +£75.00 with the actual prices of the products.

So instead it would say: £69.00 and £120.00

I have located the code being in js/varien/product.js

I’ve spent a bit of time chopping and changing the code, but can’t quite decipher what needs to change. Line 240 downwards in this file handles the JavaScript events for configurable products.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:15:29+00:00Added an answer on May 24, 2026 at 4:15 am

    This is performed by javascript. You need to modify the method getOptionLabel in js/varien/configurable.js (this is Magento 1.5.1.0, your milage may vary depending on the version you’re using).

    This method receives the option and the price difference to be applied. If you want to just show the absolute price of the different options, you need to calculate them yourself, using the absolute base value of the configurable product and the absolute difference of the option.

    The first few lines of the method look like this:

    getOptionLabel: function(option, price){
        var price = parseFloat(price);
    

    Change that so you get the absolute base price and the absolute difference of the option. Then add them together to get the final absolute price of the option. Like this:

    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;
    

    Then you need to get rid of the + and – symbols in the options. Later on in the same method, when you call this.formatPrice, just change the second paramter to false in each call.

        if(price){
            if (this.taxConfig.showBothPrices) {
                str+= ' ' + this.formatPrice(excl, false) + ' (' + this.formatPrice(price, false) + ' ' + this.taxConfig.inclTaxTitle + ')';
            } else {
                str+= ' ' + this.formatPrice(price, false);
            }  
    

    Some more notes about this:

    You will find another identical object called Product.Config being created in js/varien/product.js. As far as I can tell, this does absolutely nothing as it is replaced by js/varien/configurable.js.

    Also, if just change js/varien/configurable.js, the next time you upgrade Magento you will probably lose your changes. Better to create another file like js/varien/my_configurable.js or whatever, and call it in the config file (product.xml) for whatever theme you are using.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello i have a products table that contains normal products and configurable product It
I would like to move the configurable product options and the custom product options
I have imported all of my products as configurable and their options as simple
This is the situation: I have a configurable product with several simple products. These
In Magento, I am using bundled products and I have a configurable product as
I am looking at creating a configurable product that has various prices. Having looked
I am building an e-shop that will have configurable products. The configurable parts will
I have SCP (simple configurable product) installed and for every simple product that has
I am trying to create a grouped product by grouping some configurable products. I
I have the following code to grab a list of Products $collection = Mage::getModel('catalog/product')->getCollection();

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.