Posted By

etechblog on 10/23/11


Tagged

ajax magento


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

WGenie


Magento Ajax Based Add to Cart from category page


 / Published in: PHP
 

URL: http://www.excellencemagentoblog.com/ajax-based-product-add-to-cart-from-category-page

  1. <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocationAjax('<?php echo $this->getAddToCartUrl($_product) ?>','<?php echo $_product->getId()?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
  2.  
  3. <span id='ajax_loader<?php echo $_product->getId()?>' style='display:none'><img src='<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif')?>'/></span>

Report this snippet  

You need to login to post a comment.