3

I need to retrieve the selected custom options of the item in the wishlist. I tried the following code.

$item = Mage::getModel('wishlist/item')->load($wishlist_item_id);

$options = $item->getProductOptions();

//$options = $item->getOptions();  
print_r( $options);die();

but it shows empty array. How to retrieve the selected options of the wishlist item?

1 Answer 1

-1

Try this,

<?php
    $wishlist = Mage::getModel('wishlist/wishlist')->load($wishlist_id);
    $items = Mage::getResourceModel('wishlist/item_collection')->addWishlistFilter($wishlist);
    foreach ($items as $item){
        $options = $this->helper('catalog/product_configuration')->getOptions($item); 
        print_r($options);
    }
?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.