0
我希望当客户注册产品(这是选择在后端)应该被添加到购物车。我已经这样做了:添加产品到客户登记在magento
$product = Mage::getModel('catalog/product')
->setStoreId(Mage::app()->getStore()->getId())
->load(154);
$cart = Mage::getSingleton('checkout/cart');
$cart->addProduct($product, 1)->save();
Mage::getSingleton('checkout/session')->setCartWasUpdated(true);
in AccountController.php in createPostAction()。
但它没有显示,但每当顾客购买任何东西,它都会被添加到购物车中。我做错了什么......?
-Thnx提前。
雅它完成... thnx..ya我会实现它在观察员.... thnx为dat也... – ANKIT 2013-02-18 11:42:26