I used below code to add a product pragmatically to a Wishlist, and is working successfully-
$customer = Mage::getModel('customer/customer'); $wishlist = Mage::getModel('wishlist/wishlist'); $product = Mage::getModel('catalog/product'); $customer_id = 1; $product_id = 1; $customer->load($customer_id); $wishlist->loadByCustomer($customer_id); $wishlist->addNewItem($product->load($product_id));
My Question is that if I am having a Product with a Custom Option, then how could i add that selected option to a wishlist.
Completely, I need a Code which can add Product to a Wishlist with a selected custom option.
Please help me on this.