30 \Magento\Framework\DataObject\IdentityInterface
96 private $messageInterpretationStrategy;
99 private $itemResolver;
118 \
Magento\Catalog\Helper\Product\Configuration $productConfig,
121 \
Magento\Framework\
Url\Helper\Data $urlHelper,
131 $this->_urlHelper = $urlHelper;
132 $this->_productConfig = $productConfig;
133 $this->_checkoutSession = $checkoutSession;
135 parent::__construct($context,
$data);
136 $this->_isScopePrivate =
true;
138 $this->messageInterpretationStrategy = $messageInterpretationStrategy;
139 $this->itemResolver = $itemResolver ?: ObjectManager::getInstance()->get(ItemResolverInterface::class);
151 $this->_item =
$item;
174 return $this->
getItem()->getProduct();
185 return $this->itemResolver->getFinalProduct($this->
getItem());
195 $this->_productUrl = $productUrl;
206 if ($this->_ignoreProductUrl) {
210 if ($this->_productUrl || $this->
getItem()->getRedirectUrl()) {
220 if (
$product->isVisibleInSiteVisibility()) {
225 if (in_array(
$data->getVisibility(),
$product->getVisibleInSiteVisibilities())) {
240 if ($this->_productUrl !==
null) {
243 if ($this->
getItem()->getRedirectUrl()) {
244 return $this->
getItem()->getRedirectUrl();
263 if ($this->hasProductName()) {
264 return $this->
getData(
'product_name');
299 if (!$this->_strictQtyMode && (
string)$this->
getItem()->
getQty() ==
'') {
302 return $this->
getItem()->getQty() * 1;
331 $baseMessages =
$quoteItem->getMessage(
false);
333 foreach ($baseMessages as
$message) {
334 $messages[] = [
'text' =>
$message,
'type' =>
$quoteItem->getHasError() ?
'error' :
'notice'];
342 foreach ($additionalMessages as
$message) {
345 'text' => $this->messageInterpretationStrategy->interpret(
$message),
350 $this->messageManager->getMessages(
true,
'quote_item' .
$quoteItem->getId())->clear();
381 'cut_replacer' =>
' <a href="#" class="dots tooltip toggle" onclick="return false">...</a>' 394 return $this->
getProduct()->isVisibleInSiteVisibility();
405 return $this->
getLayout()->getBlock(
'additional.product.info');
417 $this->_strictQtyMode = $strict;
430 $this->_ignoreProductUrl = $ignore;
443 $identities = $this->
getProduct()->getIdentities();
457 $priceRender->setItem($this->
getItem());
461 $price = $priceRender->render(
462 ConfiguredPriceInterface::CONFIGURED_PRICE_CODE,
465 'include_container' =>
true,
466 'display_minimal_price' =>
true,
467 'zone' => \
Magento\Framework\Pricing\Render::ZONE_ITEM_LIST
481 return $this->
getLayout()->getBlock(
'product.price.render.default');
494 ? $this->priceCurrency->convertAndFormat(
$amount)
495 : $this->priceCurrency->convert(
$amount);
532 public function getSidebarItemPriceHtml(AbstractItem
$item)
535 $block = $this->
getLayout()->getBlock(
'checkout.cart.item.price.sidebar');
546 public function getUnitPriceExclTaxHtml(AbstractItem
$item)
549 $block = $this->
getLayout()->getBlock(
'checkout.onepage.review.item.price.unit.excl');
560 public function getUnitPriceInclTaxHtml(AbstractItem
$item)
563 $block = $this->
getLayout()->getBlock(
'checkout.onepage.review.item.price.unit.incl');
574 public function getRowTotalExclTaxHtml(AbstractItem
$item)
577 $block = $this->
getLayout()->getBlock(
'checkout.onepage.review.item.price.rowtotal.excl');
588 public function getRowTotalInclTaxHtml(AbstractItem
$item)
591 $block = $this->
getLayout()->getBlock(
'checkout.onepage.review.item.price.rowtotal.incl');
602 public function getActions(AbstractItem
$item)
606 if (
$block instanceof Actions) {
getImage($product, $imageId, $attributes=[])
getData($key='', $index=null)
getFormatedOptionValue($optionValue)
setItem(AbstractItem $item)
overrideProductUrl($productUrl)
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Catalog\Helper\Product\Configuration $productConfig, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Catalog\Block\Product\ImageBuilder $imageBuilder, \Magento\Framework\Url\Helper\Data $urlHelper, \Magento\Framework\Message\ManagerInterface $messageManager, PriceCurrencyInterface $priceCurrency, \Magento\Framework\Module\Manager $moduleManager, InterpretationStrategyInterface $messageInterpretationStrategy, array $data=[], ItemResolverInterface $itemResolver=null)
setIgnoreProductUrl($ignore=true)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
convertPrice($amount, $format=false)
getProductPriceHtml(\Magento\Catalog\Model\Product $product)
getProductAdditionalInformationBlock()