Hide Add To Cart in Grid View

It seems to me that the grid view should not have an ADD TO CART button as it is unlikely anyone would buy something without reading the details. Instead there should be a VIEW DETAILS link as some people don’t get that you can click on the product image or name to view the details, so they simply move on.



I have tried accomplishing this by editing the skins/[theme]/custumer/views/products/buy_now.tpl but I can’t really get the logic.



I tried changing around line 12


{capture name="add_to_cart"}
{if !($product.zero_price_action == "R" && $product.price == 0) && !($settings.General.inventory_tracking == "Y" && $settings.General.allow_negative_amount != "Y" && ($product.amount <= 0 || $product.amount < $product.min_qty) && $product.is_edp != "Y" && $product.tracking == "B")}
{if $product.avail_since <= $smarty.const.TIME || ($product.avail_since > $smarty.const.TIME && $product.buy_in_advance == "Y")}
{if $product.has_options && (!$product.product_options || $simple)}
{include file="buttons/button.tpl" but_id="button_cart_`$obj_id`" but_text=$lang.select_options but_href="$index_script?dispatch=products.view&product_id=`$product.product_id`" but_role="text" but_name=""}
{else}
{if $additional_link}{$additional_link} {/if}
{include file="buttons/add_to_cart.tpl" but_id="button_cart_`$obj_id`" but_name="dispatch[checkout.add..`$obj_id`]" but_role=$but_role}
{assign var="cart_button_exists" value=true}
{/if}
{/if}
{if $product.avail_since > $smarty.const.TIME}
{include file="common_templates/coming_soon_notice.tpl" avail_date=$product.avail_since add_to_cart=$product.buy_in_advance}
{/if}
{/if}
{/capture}




to:


{capture name="add_to_cart"}
{if !($product.zero_price_action == "R" && $product.price == 0) && !($settings.General.inventory_tracking == "Y" && $settings.General.allow_negative_amount != "Y" && ($product.amount <= 0 || $product.amount < $product.min_qty) && $product.is_edp != "Y" && $product.tracking == "B")}
{if $product.avail_since <= $smarty.const.TIME || ($product.avail_since > $smarty.const.TIME && $product.buy_in_advance == "Y")}
{if $product.has_options && (!$product.product_options || $simple)}

{$lang.view_details} ››


{else}
{if $additional_link}{$additional_link} {/if}
{include file="buttons/add_to_cart.tpl" but_id="button_cart_`$obj_id`" but_name="dispatch[checkout.add..`$obj_id`]" but_role=$but_role}
{assign var="cart_button_exists" value=true}
{/if}
{/if}
{if $product.avail_since > $smarty.const.TIME}
{include file="common_templates/coming_soon_notice.tpl" avail_date=$product.avail_since add_to_cart=$product.buy_in_advance}
{/if}
{/if}
{/capture}




but unfortunately that doesn’t seem to work.



Has anyone made this change? To me this seems obvious and should be a setting in the admin configuration.

In skins/basic/customer/views/categories/custom_templates/products.tpl, search for the string hide_add_to_cart_button. It will look like this:

```php

{include file=“views/products/components/buy_now.tpl” product=$product but_role=“action” show_features=true show_sku=true hide_add_to_cart_button=$hide_add_to_cart_button} ```



Change hide_add_to_cart_button to true, i.e.



```php {include file=“views/products/components/buy_now.tpl” product=$product but_role=“action” show_features=true show_sku=true hide_add_to_cart_button=true} ```