Jump to content

How to add 'add to cart' button in 'productscategory' module with ajax transfer affects


Recommended Posts

I want to add 'add to cart' button on 'productscategory' module in Prestashop 1.5.0.13

 

I has copied the code from 'product-lis.tpl':

{if ($categoryProduct.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $categoryProduct.available_for_order && !isset($restricted_country_mode) && $categoryProduct.minimal_quantity <= 1 && $categoryProduct.customizable != 2 && !$PS_CATALOG_MODE}

{if ($categoryProduct.allow_oosp || $categoryProduct.quantity > 0)}

{if isset($static_token)}

<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$categoryProduct.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$categoryProduct.id_product|intval}&token={$static_token}", true)}" title="{l s='Add to cart'}">{l s='Add to cart'}</a>

{else}

<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$categoryProduct.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$categoryProduct.id_product|intval}", true)} title="{l s='Add to cart'}">{l s='Add to cart'}</a>

{/if}

{else}

<span class="exclusive"><span></span>{l s='Add to cart'}</span><br />

{/if}

{/if}

 

 

 

here is shop link:

http://www.test77.info/theme2/index.php?id_product=13&controller=product

post-272513-0-88827700-1343106990_thumb.png

Edited by kashifkhan112 (see edit history)
Link to comment
Share on other sites

  • 6 months later...
×
×
  • Create New...