45 parent::__construct($context,
$data);
56 return $this->
getProduct()->getLinksPurchasedSeparately();
93 return $this->pricingHelper->currencyByStore(
$price,
$store,
false);
101 $finalPrice = $this->
getProduct()->getPriceInfo()
106 $amount = $finalPrice->getCustomAmount(
$link->getPrice());
107 $linksConfig[
$link->getId()] = [
108 'finalPrice' =>
$amount->getValue(),
109 'basePrice' =>
$amount->getBaseAmount()
113 return $this->encoder->encode([
'links' => $linksConfig]);
123 return $store->getUrl(
'downloadable/download/linkSample', [
'link_id' =>
$link->getId()]);
136 return $this->_scopeConfig->getValue(
138 \
Magento\Store\Model\ScopeInterface::SCOPE_STORE
150 return $this->_scopeConfig->isSetFlag(
152 \
Magento\Store\Model\ScopeInterface::SCOPE_STORE
165 $configValue = $this->
getProduct()->getPreconfiguredValues()->getLinks();
166 if (!$configValue || !is_array($configValue)) {
170 return $configValue && in_array(
$link->getId(), $configValue);
199 return $this->
getLayout()->getBlock(
'product.price.render.default')->renderAmount(
getLinkSelectionRequired()
getLinksPurchasedSeparately()
const XML_PATH_LINKS_TITLE
const XML_PATH_TARGET_NEW_WINDOW
getLinkCheckedValue($link)
__construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Framework\Pricing\Helper\Data $pricingHelper, EncoderInterface $encoder, array $data=[])