Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Items.php
Go to the documentation of this file.
1 <?php
13 
19 {
23  protected $_template = 'Magento_Wishlist::email/items.phtml';
24 
32  public function getProductUrl($product, $additional = [])
33  {
34  $additional['_scope_to_url'] = true;
35  return parent::getProductUrl($product, $additional);
36  }
37 
45  public function getAddToCartUrl($product, $additional = [])
46  {
47  $additional['nocookie'] = 1;
48  $additional['_scope_to_url'] = true;
49  return parent::getAddToCartUrl($product, $additional);
50  }
51 
58  public function hasDescription($item)
59  {
60  $hasDescription = parent::hasDescription($item);
61  if ($hasDescription) {
62  return $item->getDescription() !== $this->_wishlistHelper->defaultCommentString();
63  }
64  return $hasDescription;
65  }
66 }
getProductUrl($product, $additional=[])
Definition: Items.php:32
getAddToCartUrl($product, $additional=[])
Definition: Items.php:45