11 use Magento\CatalogRule\Model\ResourceModel\RuleFactory;
54 private $ruleResource;
74 RuleFactory $catalogRuleResourceFactory
80 $this->resourceRuleFactory = $catalogRuleResourceFactory;
90 if (
null === $this->
value) {
91 if ($this->product->hasData(self::PRICE_CODE)) {
92 $this->
value = (float)$this->product->getData(self::PRICE_CODE) ?:
false;
94 $this->
value = $this->getRuleResource()
96 $this->dateTime->scopeDate($this->storeManager->getStore()->getId()),
97 $this->storeManager->getStore()->getWebsiteId(),
98 $this->customerSession->getCustomerGroupId(),
99 $this->product->getId()
104 $this->
value = $this->priceCurrency->convertAndRound($this->
value);
115 private function getRuleResource()
117 if (
null === $this->ruleResource) {
121 return $this->ruleResource;
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
__construct(Product $saleableItem, $quantity, Calculator $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, TimezoneInterface $dateTime, StoreManager $storeManager, Session $customerSession, RuleFactory $catalogRuleResourceFactory)