how to remove magento prices

How to Remove Prices and Add to Cart Buttons from Magento Category and Product Pages

In some cases, especially business to business websites you may want to hide the prices and add to cart buttons in Magento. Unfortunately Magento does not have this functionality built in, which is a surprise since a lot of other popular shopping cart solutions do.

Follow the below steps to remove the prices and add to cart buttons from the product and category pages, it only takes 10 minutes – you will need FTP access and a code editor like Notepad++ (free) or you can use Windows built in Notepad:

Step One – Hiding the Prices

Login to your site via FTP so you can see all of the files and navigate to:

app/design/frontend/default/[Theme-Name]/template/catalog/product/price.phtml

Download the ‘price.phtml’ file and open it in Notepad++ or whichever other code editor you are using. Then at the beginning of the file (yes right at the top) paste in the below code:

Now, at the very end of the file you need to paste the below code:

The prices should now be hidden on the front end (they will still be visible to logged in users) – simply disable account creation from within the Magento admin if you do not want users to be able to login.

Step Two – Hiding the Add to Cart Buttons (on category pages)

Again login via FTP and navigate to the following location:

app/design/frontend/default/[Theme-Name]/template/catalog/product/list.phtml

Download the file and open it in your code editor; this stage is a bit trickier as you need to find certain code – find the below code within the file:

Before that code you need to insert the same line as you did before:

And after the code you need to add the following:

You will find the code twice within the file, once for each view (list and grid) – copy the procedure for each instance.

Step Three – Hiding the Add to Cart Buttons (on product pages)

Same as before login via FTP, once logged in navigate to the below location:

app/design/frontend/default/default/template/catalog/product/view.phtml

Open the file in your code editor and find the below section:

Again, before the above section paste the below:

Finally, place the following code after the snippet:

For good measure clear the Magento cache, then navigate to your site. The prices and add to cart buttons should now have disappeared.

The prices and add to cart buttons will still be visible for logged in users, this makes the solution even more useful if you have a business to business or trade website where only registered members can purchase or see prices.

Hiding Content if User is Not Logged in

The above trick can also allow you to hide content on your website to users that are not logged in, for example if you want to show a message to all users that login saying something like ‘10% off this weekend’ you would page the below on the page you want it to show, in the example we will show the message on category pages:

Navigate to the following location:

app/design/frontend/default/[Theme-Name]/template/catalog/product/list.phtml

Open the file within a code editor and find the following:

Directly after the above line place the below code (replacing my 10% off message with your own):

If you have any problems setting up the above, or I have missed something / made a mistake, please leave me a comment below and I will try my best to help you!