2

Please add this code in your file. Youo will get what you want $currentGroupId = $this->_customerSession->getCustomer()->getGroupId(); $_salesRulecollectionByCustomerGroup = $this->_salesRuleCollectionFactory->create()->addCustomerGroupFilter($currentGroupId); $collection = $this->_customerGroupCollection->load($...


2

In your block constructor inject \Magento\SalesRule\Model\ResourceModel\Rule\CollectionFactory $salesRuleCollectionFactory, and then filter the sales rules collection by customer group id $_salesRulecollectionByCustomerGroup = $this->_salesRuleCollectionFactory->create()->addCustomerGroupFilter($currentGroupId);


2

To get instock product collection. include catalogInventory stock helper class protected $stockFilter; public function __construct( \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productsCollectionFactory, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\...


1

Get Customer Attribute values by Group and Customer Id Create Helper file Data.php Path: {VendorName}/{ModuleName}/Helper/Data.php <?php namespace {VendorName}\{ModuleName}\Helper; class Data extends \Magento\Framework\App\Helper\AbstractHelper { public function __construct( \Magento\Framework\App\Helper\Context $context, \...


1

You can use this class \Magento\CatalogInventory\Helper\Stock $stockFilter->addInStockFilterToCollection($collection);


1

Yes you can do with Zend_Db_Select $select = clone $collection->getSelect(); $select->reset(Zend_Db_Select::COLUMNS); $select->reset(Zend_Db_Select::ORDER); $select->reset(Zend_Db_Select::LIMIT_COUNT); $select->reset(Zend_Db_Select::LIMIT_OFFSET); $where = $select->getPart(Zend_Db_Select::WHERE); foreach($where ...


1

Delete the entries of the respected grid on which filters are applied from ui_bookmark table. Hope it will fix the issue


Only top voted, non community-wiki answers of a minimum length are eligible