This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$product = Mage::getModel('catalog/product')->load(87); // Random product ID | |
// get cart and add product | |
$cart = Mage::getSingleton('checkout/cart'); | |
$cart->init(); | |
$cart->addProduct($product, 2); | |
// update session | |
$session->setCartWasUpdated(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Details of products and stores: */ | |
<?php | |
/** | |
* @author MagePsycho <info@magepsycho.com> | |
* @website http://www.magepsycho.com | |
* @category using Header / Footer outside of Magento | |
*/ | |
$mageFilename = '/var/www/html/magento1.9/app/Mage.php'; | |
require_once $mageFilename; |