0

If you have a custom attribute that you use everywhere, on category page, on product page, in related items, on cart page, on checkout etc., how do you add it to the collection that gets loaded by default?

For example in related items (product/list/items.phtml), if I call:

$_item->getCustomatribute()

I get null. $_item->getData() shows only a handful of "important" attributes to select, like id, sku, name etc.

I would like to add it so that I can call $_item->getCustomatribute() and not load the entire product via id.

Thanks!

0

I just had to change Used in Product Listing to yes in the backend for that attribute.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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