Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Variables
tier_prices.phtml File Reference

Go to the source code of this file.

Variables

 $tierPriceModel = $block->getPrice()
 
 $tierPrices = $tierPriceModel->getTierPriceList()
 
 $msrpShowOnGesture = $block->getPriceType('msrp_price')->isShowPriceOnGesture()
 
 $product = $block->getSaleableItem()
 
if(count( $tierPrices))( $block->hasListClass() ? $block->getListClass() :'prices-tier items') ?>"> <?php foreach ($tierPrices as $index $productId = $product->getId()
 
 $isSaleable = $product->isSaleable()
 
 $popupId = 'msrp-popup-' . $productId . $block->getRandomString(20)
 
if($msrpShowOnGesture && $price['price']->getValue()< $product->getMsrp()) if($isSaleable) $tierPriceData
 
if($block->getCanDisplayQty($product)) else = __('Click for price')
 
if($block->getCanDisplayQty($product)) endif
 
 endforeach
 

Variable Documentation

◆ $isSaleable

$isSaleable = $product->isSaleable()

Definition at line 26 of file tier_prices.phtml.

◆ $msrpShowOnGesture

$msrpShowOnGesture = $block->getPriceType('msrp_price')->isShowPriceOnGesture()

Definition at line 17 of file tier_prices.phtml.

◆ $popupId

$popupId = 'msrp-popup-' . $productId . $block->getRandomString(20)

Definition at line 27 of file tier_prices.phtml.

◆ $product

$product = $block->getSaleableItem()

Definition at line 18 of file tier_prices.phtml.

◆ $productId

if (count($tierPrices)) ($block->hasListClass() ? $block->getListClass() : 'prices-tier items') ?>"> <?php foreach ($tierPrices as $index $productId = $product->getId()

Definition at line 25 of file tier_prices.phtml.

◆ $tierPriceData

if ( $msrpShowOnGesture &&$price[ 'price']->getValue()< $product->getMsrp()) if ( $isSaleable) $tierPriceData
Initial value:
= [
'addToCartUrl' => $addToCartUrl,
'name' => $product->getName(),
'realPrice' => $block->renderAmount(
$price['price'],
[
'price_id' => $index,
'id_suffix' => '-' . $index,
'include_container' => true
]
),
'msrpPrice' => $block->renderAmount(
$block->getPriceType('msrp_price')->getAmount(),
[
'price_id' => $index,
'id_suffix' => '-' . $index,
'include_container' => true
]
),
]
$product
$price
$block
Definition: block.php:8
$index
Definition: list.phtml:44
$addToCartUrl
Definition: msrp.phtml:33

Definition at line 34 of file tier_prices.phtml.

◆ $tierPriceModel

$tierPriceModel = $block->getPrice()

Definition at line 15 of file tier_prices.phtml.

◆ $tierPrices

$tierPrices = $tierPriceModel->getTierPriceList()

Definition at line 16 of file tier_prices.phtml.

◆ else

if ( $block->getCanDisplayQty( $product)) else = __('Click for price')

Definition at line 62 of file tier_prices.phtml.

◆ endforeach

endforeach

Definition at line 86 of file tier_prices.phtml.

◆ endif

endif

Definition at line 62 of file tier_prices.phtml.