0

I have an attribute set for example "Camera" in that set, we have multiple groups like; General, Recording, Storage, Monitoring etc...

All those groups have attributes which are specifications from that product, it can be a drop down, open field, multiple select.

What I have on the product detail page on the front-end is an accordion with the groups General, Recording, Storage, Monitoring. But I need to get all the attributes per group. Now I will load all the attributes piece by piece but there will be more than 60 attributes so that will be too much to handle.

Is there a way to load all the attributes from a specific group (not a Set).

1 Answer 1

2

If you have the id of the group and assuming that $product is the current product you can get the attributes like this:

$product->getAttributes($groupId);
1
  • Thanks, do you also know how to find the groupId?
    – n00bly
    Commented Jul 18, 2019 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.