44 \
Magento\Framework\Registry $coreRegistry,
48 $this->_coreRegistry = $coreRegistry;
50 parent::__construct($context);
61 $id = (int)$this->getRequest()->getParam(
'id');
66 $item = $this->_objectManager->create(\
Magento\Wishlist\Model\Item::class);
68 if (!
$item->getId()) {
69 throw new \Magento\Framework\Exception\LocalizedException(
70 __(
"The Wish List item can't load at this time. Please try again later.")
73 $wishlist = $this->wishlistProvider->getWishlist(
$item->getWishlistId());
78 $this->_coreRegistry->register(
'wishlist_item',
$item);
80 $params = new \Magento\Framework\DataObject();
82 $params->setConfigureMode(
true);
89 $this->_objectManager->get(\
Magento\Wishlist\Helper\Data::class)->calculate();
94 $this->_objectManager->get(
95 \
Magento\Catalog\Helper\Product\View::class
98 $item->getProductId(),
104 }
catch (\
Magento\Framework\Exception\LocalizedException $e) {
105 $this->messageManager->addError($e->getMessage());
106 $resultRedirect->setPath(
'*');
107 return $resultRedirect;
108 }
catch (\Exception $e) {
109 $this->messageManager->addError(
__(
'We can\'t configure the product right now.'));
110 $this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);
111 $resultRedirect->setPath(
'*');
112 return $resultRedirect;
foreach($product->getExtensionAttributes() ->getBundleProductOptions() as $option) $buyRequest
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]