I am developing one extension. I have created attribute at backend and assigned to product. And I am changing that product attribute while adding to cart and I am fetching same on checkout/cart page but I am not able to get same value on checkout/cart page.
I am storing this product value in checkout/cart model like this:
//saving product to cart
$product_id = Mage::app()->getRequest()->getPost('id');
$qty = Mage::app()->getRequest()->getPost('qty');
$product = Mage::getModel('catalog/product')->load($product_id);
$product->setCanImage('wasdwasdwasd');
$cart = Mage::getModel('checkout/cart');
$cart->init();
$cart->addProduct($product, array('qty' => $qty));
$cart->save();
Mage::getSingleton('checkout/session')->setCartWasUpdated(true);
Mage::getSingleton('core/session')->addSuccess('Product added successfully');
And I can retrieve my attribute value at same page like following code but I am not able to get it on checkout/cart page.
$cartQuote = Mage::getModel('checkout/cart')->getQuote()->getAllVisibleItems();
foreach ($cartQuote as $item) {
$productId = $item->getProduct()->getId();
$productPrice = $item->getProduct()->getPrice();
$item->getProduct()->getCanImage();//I can get my value here
}
And I have used same code which is above but I am not getting value from checkout/cart quote.
And I don't want to store this value in database because it will create trouble if many user will add this product dynamically so I think quote is good place to keep data for product.
Please suggest me solution.