Get wishlist collection of a customer by customer id Magento 2.

You can get wishlist collection of a customer by customer id. You can show detail of Customer Wishlist item in a store. Get Wishlist collection by calling Magento\Wishlist\Model\Wishlist Model file.

I have created a Block file for define Wishlist collection and load collection in template file by iterating over a collection loop.

Call function in a template file, If Customer has wishlist item available, display item info otherwise no item found message will be displayed.

The result will be your Item list from a Wishlist.

Leave a Reply

Your email address will not be published. Required fields are marked *