Follow by Email

Friday, November 11, 2011

Delete all product from cart

I have add a function in the app\code\core\Mage\Checkout\controllers\CartController.php

if you call this it will delete all item in the cart.

the url should be

public function deleteallAction()
$items $cartHelper->getCart()->getItems();       
        foreach (
$items as $item)

Wednesday, November 9, 2011

Get all product name

foreach(Mage::getModel(‘catalog/product’)->getCollection()->getData() as $product)
echo Mage::getModel(‘catalog/product’)->load($product['entity_id'])->getName();