Please help. I want get attribute by [attribute_group_code]. Please help me. My code is as follows:
<?php $product = $this->getProduct(); $attributeSetId = $product->getAttributeSetId(); $groupCollection = $this->groupCollectionFactory->create() ->setAttributeSetFilter($attributeSetId) ->setSortOrder() ->load(); foreach ($groupCollection as $group) : $attributes = $product->getAttributes(); echo "<pre>"; print_r ($group->getData()); echo "</pre>"; ?> Return : Array ( [attribute_group_id] => 21 [attribute_set_id] => 4 [attribute_group_name] => Operate [sort_order] => 3 [default_id] => 0 [attribute_group_code] => operate [tab_group_code] => ) // Get attribute value , label <?php endforeach; ?> I just want to get these attribute groups (operate) values based on ['attribute_group_code']. Because when creating the attribute group in admin, I will not know the id of the attribute group, so I only rely on the attribute_group_code. Thank you.