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] =>…

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 }

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…

Error while deleting node field

I am using Drupal 8. When the cron runed it deletes the node field from db. Here my code if ($lesson->field_lesson_ended_at->value < $current_time && $session_id && count($paragraphs) > 0) { $pids = []; foreach ($paragraphs as $paragraph) { $pids[] = $paragraph[‘target_id’]; } $storage_handler = \Drupal::entityTypeManager()->getStorage(‘paragraph’); $entities = $storage_handler->loadByProperties([‘id’ => $pids]); foreach ($entities as $entity) {…

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] =>…

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] =>…

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] =>…