Is it possible to add several the same product times to the cart with a different name? I did with different price, but I have not managed to do it with a different name.
I used an observer "sales_quote_item_set_product"
but sets the same name when there are several products in cart.
The product is added by programming with "checkout_cart_product_add_after"
event, using:
$quote = Mage::getSingleton('checkout/session')->getQuote(); $quoteItem = $quoteItem = Mage::getModel('sales/quote_item'); $quoteItem->setProduct($product_model); $quoteItem->setQuote($quote); $quoteItem->setQty('1'); $quoteItem->setParentItem(NULL); $quoteItem->setStoreId(Mage::app()->getStore()->getId()); $quoteItem->setName('Custom Name')//I need this, but does not work $quoteItem->setOriginalCustomPrice(0); $quote->addItem($quoteItem)->save();
If I print the value of $quoteItem
with var_dump()
I see if the name was changed, but in the cart appears with the original name.
Another option was to use $product_model->setName()
before $quoteItem->setProduct($product_model)
but in the cart appears also with the original name.