I'm trying to display a couple of product attributes on the wishlist page.
However, when I call $product->getData('attribute_code')
it returns NULL.
Here is the code I currently have in place:
app/code/vendor/extension/etc/catalog_attributes.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/catalog_attributes.xsd">
<!-- Wishlist Page -->
<group name="wishlist_item">
<attribute name="binding"/>
<attribute name="used"/>
<attribute name="format"/>
</group>
</config>
app/design/frontend/vendor/Theme/Magento_Wishlist/templates/item/list.phtml
$test = $product->getData('binding'); var_dump($test); // displays NULL
I looked under
Store -> Attributes -> Product -> binding -> Storefront Properties
and "Used in Product Listing" is set to "Yes"
I also toggled "Visible on Catalog Pages on Storefront" with no change.
What am I missing?