1

I'm trying to add more columns, with custom attributes into the frontend product grid in Magento 2.2.4

I've overridden

vendor/magento/module-grouped-product/Block/Product/View/Type/grouped.phtml

into my local module and I can get text to appear in the grid but not custom attributes.

I'm obviously missing something obvious but not sure what.

My custom product attributes consist of 3 types: text, dropdown and multiselect but I can't even get the text one to show up

I've also tried adding in individual row "Add To Basket" buttons and they appear but don't do anything when clicked.

I've spent days searching and can only find answers for M1.

This is an example from a website that does it quite well, not sure what engine they use

enter image description here

Would appreciate your help everyone

1 Answer 1

0

Take a look at https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php#L211

You can add your custom attributes by overriding that method.

1
  • Thanks. That works on core attributes like 'sku' but doesn't add custom attributes. I can't get it to show any attribute I've added even though they show in the attribute block on the product page. Any other ideas, would really appreciate it.
    – wjp_bill
    Commented Jul 3, 2018 at 10:22

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.