Adding hide_add_to_cart function for CreLoaded B2B template OS03C00317


Adding hide_add_to_cart function for CreLoaded B2B template OS03C00317

1. In your az_pl_src_cre_317.php add this line:

    $hide_add_to_cart = hide_add_to_cart(); 

2. Then add attributes to the xml at line 913 - 925, add this one

    $response .= '<add_to_cart><![CDATA['.$hide_add_to_cart.']]></add_to_cart>'."\n";

3. In your /templates/OS03C00317/includes/js/pl.core.js add this below line 96 where the values of xml where initiated.

    pl_data[i]['add_to_cart'] = $("add_to_cart", this).text() ? $("add_to_cart", this).text() : 0;

4. In your pl.view.js add a condition before you display your add to cart button in both list and grid view the condition should be:

     if(!add_to_cart){
....code to display the add to cart button
}

You can view this article online at:
http://docs.algozone.com/article/adding-hide-add-to-cart-function-for-creloaded-b2b-temp