Some times when customizing the themes for magento we need to get the add to cart url for magento products.Its not much complicated as its done with the help of one line of code

$this->helper('checkout/cart')->getAddUrl($_product);
Mage::helper('checkout/cart')->getAddUrl($_product);

The above codes shows the two ways to get the add to cart url for magento products

Leave a Reply

Your email address will not be published.