Attribute set collection returns multiple instance of attribute set “Default”

I am getting the attribute set collection $attributeCollection = $this->eavCollectionFactory->create(); $attributeSet=$attributeCollection->getItems(); foreach($attributeSet as $attSet){ print_r($attSet->getData()); } its return the following result Array ( [attribute_set_id] => 1 [entity_type_id] => 1 [attribute_set_name] => Default [sort_order] => 2 ) Array ( [attribute_set_id] => 2 [entity_type_id] => 2 [attribute_set_name] => Default [sort_order] => 2 ) Array ( [attribute_set_id] =>…

Details

How to get rule id with respect to customer group id

class CouponCode extends \Magento\Framework\View\Element\Template { protected $_customerSession; protected $_customerGroupCollection; public function __construct( \Magento\Customer\Model\Session $customerSession, \Magento\Customer\Model\Group $customerGroupCollection, \Magento\Framework\View\Element\Template\Context $context) { $this->_customerSession = $customerSession; $this->_customerGroupCollection = $customerGroupCollection; parent::__construct($context); } public function getCouponCodes() { $currentGroupId = $this->_customerSession->getCustomer()->getGroupId(); //Get customer group Id , you have already this so directly get name $collection = $this->_customerGroupCollection->load($currentGroupId); return $collection->getCustomerGroupCode();//Get group name }

Details

How to copy Luma Layered Navigation to Blank Theme

I have created a custom theme in Magento 2.3 which is extended from the blank theme. I would like to use the luma layered navigation. I have copied Magento_LayeredNavigation folder from /vendor/magento/theme-frontend-luma to my theme path app/design/frontend/vendor/theme/ and ran the static content deploy. I then receive the following error message: main.CRITICAL: variable @filter-quantity is undefined…

Details

Redirect taxonomy term to query string without trailing slash

I am using a custom template to filter posts with query string and need to redirect all auto-generated URLs to that template, so that domain.com/taxonomy/term/ should redirect to domain.com/template/?taxonomy=term. This is what I have now: RedirectMatch 301 ^/taxonomy/(.*)/?$ /template/?taxonomy=$1 But it results in domain.com/template/?taxonomy=term/ (with a trailing slash at the end), which breaks my filters.…

Details