I have a configurable item in the wishlist. I hope to add this product to the cart. default functionality takes this item out of the wishlist using something like $item->unset. How can I add this item to the cart without unsetting it from the wishlist itself? Dumping some info about the object reveals this structure here:
Array
(
[info_buyRequest] => Mage_Wishlist_Model_Item_Option Object
(
[_item:protected] => Mage_Wishlist_Model_Item Object
(
[_customOptionDownloadUrl:protected] => wishlist/index/downloadCustomOption
[_eventPrefix:protected] => wishlist_item
[_eventObject:protected] => item
[_options:protected] => Array
(
[0] => Mage_Wishlist_Model_Item_Option Object
*RECURSION*
[1] => Mage_Wishlist_Model_Item_Option Object
(
[_item:protected] => Mage_Wishlist_Model_Item Object
*RECURSION*
[_product:protected] =>
[_eventPrefix:protected] => core_abstract
[_eventObject:protected] => object
[_resourceName:protected] => wishlist/item_option
[_resource:protected] =>
[_resourceCollectionName:protected] => wishlist/item_option_collection
[_cacheTag:protected] =>
[_dataSaveAllowed:protected] => 1
[_isObjectNew:protected] =>
[_data:protected] => Array
(
[option_id] => 123
[wishlist_item_id] => 123
[product_id] => 123123
[code] => attributes
[value] => a:1:{i:123;s:4:"123123";}
)
How do I go about accessing these attribute values? Is there a better way?
The above information is found by using $item->getProduct()->getCustomOptions() on the configurable wishlist item.