QUESTION:
Exception #0 (Exception): Warning: Declaration of Bss\CatalogRulePerStoreView\Model\ResourceModel\RuleFrontend::getRulePrices(DateTimeInterface $date, $websiteId, $customerGroupId, $productIds) should be compatible with Magento\CatalogRule\Model\ResourceModel\Rule::getRulePrices(DateTime $date, $websiteId, $customerGroupId, $productIds) in /var/www/html/app/code/Bss/CatalogRulePerStoreView/Model/ResourceModel/RuleFrontend.php on line 0
ANSWER:
This exception/die site due to the module is not compatible with M2.1.2, the core function declaration is now different from this old version which leads to incompatibility of extend class with module Magento 2 Catalog Price Rule Per Store View.
Solution:
Please edit the two files as below to fix the issue:
File: Model/ResourceModel/RuleAdmin.php
Line 159
From
public function getRulePrices(\DateTimeInterface $date, $websiteId, $customerGroupId, $productIds, $storeId = null)
To
public function getRulePrices(\DateTime $date, $websiteId, $customerGroupId, $productIds, $storeId = null)
File: Model/ResourceModel/RuleFrontend.php
Line 49
From
public function getRulePrices(\DateTimeInterface $date, $websiteId, $customerGroupId, $productIds)
To
public function getRulePrices(\DateTime $date, $websiteId, $customerGroupId, $productIds)
If you need further assistant, please feel free to contact us via https://bsscommerce.com/contact. We'd be happy to support.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article