Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to Hide a Simple Product’s Option Pricing? 
 
garnish
Jr. Member
 
Total Posts:  15
Joined:  2007-10-16
 

Trying to figure out how to hide the option pricing (the +$564.00) on this page - http://www.floorsection.com/adore-153-002-000.html

I want the functionality to remain as is when you click on it, meaning the product’s price is adjusted depending on what you click on as it is now. I just would like to hide the pricing in the dropdown so you can’t see it.

I’ve mined the code of the relevant files as per the Template Hints without any success. Any thoughts?

Thanks,
ryan

 
Magento Community Magento Community
Magento Community
Magento Community
 
mzentrale1
Guru
 
Total Posts:  731
Joined:  2007-12-06
Stuttgart, Germany
 

Hi,

check js file js/varien/product.js, here the function formatPrice: out of class Product.Config

formatPrice: function(priceshowSign){
        
var str '';
        
price parseFloat(price);
        if(
showSign){
            
if(price<0){
                str
+= '-';
                
price = -price;
            
}
            else{
                str
+= '+';
            
}
        }

        
var roundedPrice = (Math.round(price*100)/100).toString();

        if (
this.prices && this.prices[roundedPrice]{
            str
+= this.prices[roundedPrice];
        
}
        
else {
            str
+= this.priceTemplate.evaluate({price:price.toFixed(2)});
        
}
        
return str;
    
},

this is the part you have to edit:

if(showSign){
            
if(price<0){
                str
+= '-';
                
price = -price;
            
}
            else{
                str
+= '+';
            
}
        }

cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
garnish
Jr. Member
 
Total Posts:  15
Joined:  2007-10-16
 

Thanks for the quick response, but that didn’t seem to work. I removed the code you specified but the price was still visible. I noticed that the code falls under “configurable products”. We’re using Simple Products with added options (you can add options in the last tab in the admin for a simple product on that simple product’s edit page).

Not sure if this would mean the code is elsewhere or not. Any other ideas?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top