Jump to content

remove add to cart from product list page


Recommended Posts

  • 5 months later...

 

Look in your product-list.tpl file and just remove the code for the 'Add to cart' button.

 

Marty Shue

 

This doesn't seem to work for me. I removed the chunk of text associated with adding to cart (I know some PHP, so I managed to change it to "view" instead)...nothing is changing in the store front.

Link to comment
Share on other sites

This doesn't seem to work for me. I removed the chunk of text associated with adding to cart (I know some PHP, so I managed to change it to "view" instead)...nothing is changing in the store front.

 

When you modify .tpl files you MUST recompile smarty templates real time, by:

 

back office-->preferences-->performance

 

force compile to 'Yes'.

 

remember to set to 'No' after your finish testing your .tpl(s)

Link to comment
Share on other sites

  • 1 year later...

I use PrestaShop™ 1.5.6.0, and I want to remove "ADD TO CART" button from the product list page.
I try with command from the MENU in Back office "PREFERENCES - PRODUCTS - Product Page - Display the "add to cart" button when a product has attributes (YES - NO) didn't work on some products with attributes (I could not figure out why).

Here's how I solved the problem:
Go to folder: /themes/default
Find file: product-list.tpl
Edit: this line in row 57: {if ($product.id_product_attribute == 0 || (isset($add_prod_display)
Change 0 to 1             : {if ($product.id_product_attribute == 1 || (isset($add_prod_display)

Picture: http://screencast.com/t/Z8r2sd04ndz

Now is everything work fine.

Link to comment
Share on other sites

so if you want to remove add to cart button, the easies thing is to edit product-list.tpl file

					{if ($product.allow_oosp || $product.quantity > 0)}
						{if isset($static_token)}
							<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html'}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a>
						{else}
							<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}", false)|escape:'html'}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a>
						{/if}						
					{else}
						<span class="exclusive"><span></span>{l s='Add to cart'}</span><br />
					{/if}
				{/if}
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...