Archive for February, 2011

Magento adding downloadable product to cart by coding php

Probably you know it’s possible to add a product to the cart via querystring, but may be you prefer code a new module for your needs using Magento objects and methods. So adding a simple product is easy: … $cart = Mage::getSingleton('checkout/cart'); // start adding the product try { $cart->addProduct($product, array('qty' => 1)); // save [...]


Categories