Removing Top or Bottom Price on Magento Product Page
on February 3, 2011
If you set up configurable products in Magento, you will notice that the product page now has the price listed twice: once at the top of the product page and a second time below the configurable product options. This post details how to remove the top and / or the bottom price display.
To remove the top price display:
1) Open /app/design/frontend/default/THEME/template/catalog/product/view/type/configurable.phtml.
2) At the bottom of the file, add the following code:
<script>
$$('div.product-shop .price-box').invoke('setStyle', { display: 'none' });
</script>
This is a bit of a hack and is not the most elegant solution, but most importantly it works. It removes the top price and not the bottom price. It only does this for configurable products.
To remove the bottom price display:
1) Open app/design/frontend/default/THEME/template/catalog/product/view/price_clone.phtml .
2) Comment out the below code:
<?php echo $this->getPriceHtml($_product, false, '_clone') ?>
Voila!
Come on, really?
Adding javascript just to hide a div that you can easily do in css code?
Just set a display: none to the product-options-bottom div…
.product-options-bottom .price-box { float:left; margin:0; padding:0; display: none}
gringo, you are not understanding at all
You cannot remove the top price with css, doing that would also cause it to not show on other product pages that only have 1 price displayed
Hi guys… I got a problem. I want to do exactly the opposite.That is, show the price. My Magento version is 1.6.1.0 and the theme is Absolute. Could u explain in a “for dummies” way how to do it?
My email is: [email protected]
This is the link with the problem: http://bit.ly/yETuUp
Thanks in advance
Hi Luiz, thanks for your comment. We’ve sent you an email regarding the changes you want to make.
Hi there,
I have previously fixed this problem (price not showing on product’s page) by copying Magento’s defautt catalog.xml data and pasting it to f001 (absolute theme) catalog.xml
But now I have tried this solution and it didnt work because it destroyed my header menu and products link.
If I choose ”default” on product configuration it shows up but appears Magento page as well, thus, this is not an option. Anybody can help me out?
Hi Luiz, it sounds like the issue you are encountering may be due to your theme structure. Did you overwrite the f001 / absolute theme’s catalog XML when you pasted the default? If you’d like us to take a look, please contact us with your store URL and we’ll be happy to assist.
hi
i have tried your solution to remove the top price
but its not working
i am using v1.6.1 and a custom theme from emthemes
i have also tried it on base folder and custom theme folder
ill be waiting for your reply
thanks
well thanks
i was able to remove the bottom price from your solution
please let me know if this code is called on some other page also
thanks
Hi Qasim, I think the issues you may be having removing the top price may be due to changes in templates and file structures between Magento 1.4.x and 1.6.x. Off the top of my head I do not know where else this code is called.
thanks for your help
🙂
I am having the same problem as Qasim. I can easily remove the bottom price, but can not for the world seem to be able to remove the top price in x1.6.
Can anyone help us?
File structure is slightly different in 1.6.x, so try /app/design/frontend/YOUR_PACKAGE/YOUR_THEME/template/catalog/product/view/type/configurable.phtml.
Also, what type of products do you have in your store? Simple or Configurable? If it’s not configurable, you’ll need to find the appropriate file.
Very very simple answer – using the layout files, add a class to the “body” element, for only configurable products.
Look for “PRODUCT_TYPE_configurable” in the “catalog.xml” layout file.
Then, add a specific class to the “body” element. This class will only appear on product pages that are for configurable products.
For example:
configurable-products-class
Then, to hide the top price for configurable products, you will use “display: none” for the class “.configurable-products-class .price-box”. Then, beneath that, use “display: block” for the class “.configurable-products-class .product-options-bottom .price-box”.
Very very simple. Seems you guys are over thinking it.
Great suggestion Eric, thanks for sharing.
Hi
I am very new to magento and i am wanting to display the price on the product page. i am using version 1.6.1.0
Please can some help me??
thanks
Hi Kriss, with a fresh install, the price should automatically display on the product page assuming that you’ve input a product and filled in the price field. Are you not seeing this?
Thank u Very Much…..It helped me a lot..
Hope that u will come forward with some video tutorials…
Look for “PRODUCT_TYPE_configurable” in the “catalog.xml” layout file.
Then, add a specific class to the “body” element. This class will only appear on product pages that are for configurable products.
—————–
How do you go about adding a class to the configurable section? I cant get it to work. Thanks!
Hi Kyle, try <body class=”YOURCLASS”>. If that doesn’t do the trick, email us your code and we’ll take a look.
Looking for the same thing as mentioned here. Trying to hide the top price for configurable products only en maybe also the stock status on top. I’m using the Magento mechanics grid which shows the price & stock status of the associated products, no need for the top prices/quantity. And off course I want my simple products to show (top)price and stock status correctly. Eric’s suggestion seems to be close to what I need, but since I’m not very experienced I need more detailed step by step info on changing what exectly on the catalog.xml and css file. Anywone who who can fill up the gaps in Eric’s explanation which makes it more understandable for a non professional?
Thanks a lot
Hi BG, have you followed the steps in the post for removing top price? If it does not do the trick, Eric’s suggestion should work too. You just need to find right place in catalog.xml. If you’re having difficulties with it, you can email us a copy of the file and we’ll look at it: https://www.collaboration133.com/contact/.
[…] Now you should only have 1 price showing on this page. This solution was found here by https://www.collaboration133.com This entry was posted in Magento by admin. Bookmark the […]
Hi, Just to clear Eric’s solution up a little,
In the file app/design/frontend/default/yourtheme/layout/catalog.xml underneath Catalog Product View (Configurable) place the following code your-new-class
Oops sorry, looks like I can’t paste code here!
Hi Dene, yeah, the WordPress comments section doesn’t like code. If you’d like to send it to us as a text file, we can upload and link to it though. Cheers!
From this page i need to remove top price box. From last one week on-wards am trying to solve this issue. I followed what some people suggested above. But still problem is remain. Please can anybody help me….?
Make sure that you are editing the right file (in the right package/theme). Also, what version of Magento are you using?
Quick & Dirty…. 😛
Quick and easy fix, thanks for that!
You’re welcome!
I am trying to do this same thing for a bundle product in 1.7.0.2. Any idea where I would find it?
Worked great, thanks!!!! I worked on this for a few hours. Found your page and it took 2 minutes!
Awesome, glad it helped you out!
Take a look at
/app/design/frontend/default/THEME/template/catalog/product/view/type/bundle.phtml
. Or check in thebase/default
folder if there is not one in the theme files.thanx