Magento Expert Forum - Improve your Magento experience

Results 1 to 2 of 2

How to retrieve wishlist data in magento using REST API

  1. #1
    Junior Member
    Join Date
    Mar 2014
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation How to retrieve wishlist data in magento using REST API

    Hello All,

    I am writing an REST API in magento to retrieve the wishlist data. I have written the below code, I got an "Invalid auth/bad request (got a 500, expected HTTP/1.1 20X or a redirect)" error message. Please suggest what is the issue.


    PHP Code:
    $customer Mage::getSingleton('customer/session')->getCustomer();

    $wishList Mage::getSingleton(‘wishlist/wishlist’)->loadByCustomer($customer);
    $wishListItemCollection $wishList->getItemCollection();
    if (
    count($wishListItemCollection)) {
     
    $productId = array();
     foreach (
    $wishListItemCollection as $item) {
     
    $product $item->getProduct();
     
    $productId[] = $product->getId();
     }
     }
    return 
    $wishListItemCollection

    Thanks

    View more threads in the same category:


  2. #2
    Administrator david's Avatar
    Join Date
    Nov 2012
    Posts
    261
    Thanks
    22
    Thanked 42 Times in 34 Posts

    Default

    You meet the problem with api authentication but you show here the code for the wishlist retrieve. You need to check auth to get it work success first.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •