Jump to content

Remove Add to Cart Button - Prestashop 1.6.0.9


Go to solution Solved by Mbak-Noe,

Recommended Posts

Hi,

 

 

how to remove add to cart and more button when it shows at Featured Products on the homepage module....? but i want to remove it from that module only...

 

 

 

 

 

Hello,

 

Сomment out in file themes\default-bootstrap\product-list.tpl

{*
						{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.customizable != 2 && !$PS_CATALOG_MODE}
							{if (!isset($product.customization_required) || !$product.customization_required) && ($product.allow_oosp || $product.quantity > 0)}
								{capture}add=1&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}{/capture}
								<a class="button ajax_add_to_cart_button btn btn-default" href="{$link->getPageLink('cart', true, NULL, $smarty.capture.default, false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}" data-minimal_quantity="{if isset($product.product_attribute_minimal_quantity) && $product.product_attribute_minimal_quantity > 1}{$product.product_attribute_minimal_quantity|intval}{else}{$product.minimal_quantity|intval}{/if}">
									<span>{l s='Add to cart'}</span>
								</a>
							{else}
								<span class="button ajax_add_to_cart_button btn btn-default disabled">
									<span>{l s='Add to cart'}</span>
								</span>
							{/if}
						{/if}
                        *}
  • Like 2

Share this post


Link to post
Share on other sites
  • Solution

 

Hello,

 

Сomment out in file themes\default-bootstrap\product-list.tpl

{*
						{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.customizable != 2 && !$PS_CATALOG_MODE}
							{if (!isset($product.customization_required) || !$product.customization_required) && ($product.allow_oosp || $product.quantity > 0)}
								{capture}add=1&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}{/capture}
								<a class="button ajax_add_to_cart_button btn btn-default" href="{$link->getPageLink('cart', true, NULL, $smarty.capture.default, false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}" data-minimal_quantity="{if isset($product.product_attribute_minimal_quantity) && $product.product_attribute_minimal_quantity > 1}{$product.product_attribute_minimal_quantity|intval}{else}{$product.minimal_quantity|intval}{/if}">
									<span>{l s='Add to cart'}</span>
								</a>
							{else}
								<span class="button ajax_add_to_cart_button btn btn-default disabled">
									<span>{l s='Add to cart'}</span>
								</span>
							{/if}
						{/if}
                        *}

 

Hi WebtetDev,

 

Thanks for your help, it works... :)

  • Like 1

Share this post


Link to post
Share on other sites
  • 10 months later...
  • 5 months later...

where do i add the code i know its in the product-list.tpl 

but what line do i add the code too?

 

also i want to hide the add to cart button on the homepage when they hover over the image it appears 

i don't want it to show like that i will only want them to see add to cart after they click on the item.

 

but i would like to keep the "more" button

 

how do i achieve this ?

Share this post


Link to post
Share on other sites

ok i got rid of the add t cart like i wanted to doing this 

 

preferences > products

 

there is a field named: "Display the "add to cart" button when a product has attributes"

rb0LWaJ.png

Display or hide the "add to cart" button on category pages for products that have attributes forcing customers to see product 

 

thanks to https://www.prestashop.com/forums/topic/352924-remove-add-to-cart-button-or-add-an-options-button-for-products-with-attributes-prestashop-16/ 

 

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

but im not like how the more button is appearing on the left side on hover can u tell me how to center the more button or just remove it completely ?

Share this post


Link to post
Share on other sites

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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More