I have one module is set up and it has configuration about enable/disable the module. I have multiple stores too. I want the functionality to disable or hide price filter from category page if the module is enabled or not.
In my module, I have the function in helper which returns the value of module enabled or not. It would depend on store view.
As the price attribute has global scope, So we can not directly use this:
Catalog->Attributes ->Manage Attributes -> Price -> Use In Layered Navigation -> "No".
Now I want to disable the price filter from left/right navigation from the category page.
Is anyone have any an idea about it?
in Helper\Data.php
I have content as below:
namespace Name\Module\Helper; class Data extends \Magento\Framework\App\Helper\AbstractHelper { const XML_CONFIG_ENABLE = "sectionid/groupid/fieldid"; protected $scopeConfig; public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig ) { $this->scopeConfig = $scopeConfig; } public function getModuleStatus() { return $this->scopeConfig->getValue(self::XML_CONFIG_ENABLE, \Magento\Store\Model\ScopeInterface::SCOPE_STORE); }
Thanks.