[SOLVED] How to read and modify super attributes?


#1

We have attribute called “size” and I can see it’s options when I navigate to Products -> Attributes.

What I cannot do is see what my product (or product variant) has currently set for this attribute.

How can we read and modify the value of “size” attribute considering our starting point is SpyProduct object?

Nothing about admin panel modifications is mentioned on super attribute page either:
https://documentation.spryker.com/capabilities/product_management/product/super-attributes.htm


#2

Hi Jan,

Super attributes are hidden in the UI for a reason.
You can re-define project/vendor/spryker/product-attribute-gui/src/Spryker/Zed/ProductAttributeGui/Presentation/View/_partials/attribute-table.twig on a project level and change this line:
- <tr {% if isSuper %} {{ ‘style=“display: none”’ }} {% endif %}>
+ <tr {% if isSuper %} {% endif %}>

Best regards,
Valerii


#3

@tvalerii I’ve asked about getting the data from the object (as in php logic) not the view.
However I found those attributes in Storage table (and the rest in localizedAttributes table). thank for the suggestion about the twig templates, though.