Skip to content

Commit

Permalink
MAGETWO-43237: [GITHUB] adding item to cart from My Wish List shows J…
Browse files Browse the repository at this point in the history
…SON object #1846
  • Loading branch information
slavvka committed Oct 2, 2015
1 parent 309856b commit c51e13a
Show file tree
Hide file tree
Showing 3 changed files with 453 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/code/Magento/Wishlist/CustomerData/Wishlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@ protected function getItems()
$collection->clear()->setPageSize(self::SIDEBAR_ITEMS_NUMBER)
->setInStockFilter(true)->setOrder('added_at');
$items = [];
/** @var \Magento\Wishlist\Model\Item $wishlistItem */
foreach ($collection as $wishlistItem) {
/** @var \Magento\Catalog\Model\Product $product */
$product = $wishlistItem->getProduct();
$imageHelper = $this->imageHelper->init($product, 'wishlist_sidebar_block');
$this->imageHelper->init($product, 'wishlist_sidebar_block');
$items[] = [
'image' => [
'src' => $imageHelper->getUrl(),
'alt' => $imageHelper->getLabel(),
'width' => $imageHelper->getWidth(),
'height' => $imageHelper->getHeight(),
'src' => $this->imageHelper->getUrl(),
'alt' => $this->imageHelper->getLabel(),
'width' => $this->imageHelper->getWidth(),
'height' => $this->imageHelper->getHeight(),
],
'product_url' => $this->wishlistHelper->getProductUrl($wishlistItem),
'product_name' => $product->getName(),
Expand Down
Loading

0 comments on commit c51e13a

Please sign in to comment.