cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch Custom Product Attribute in Product Recommendations

Fetch Custom Product Attribute in Product Recommendations

We am using Product Recommendations module for Enterprise website.

https://marketplace.magento.com/magento-product-recommendations.html

 

All data is properly showing. We only need to show custom product attribute in this product recommendations listing.

2 REPLIES 2

Re: Fetch Custom Product Attribute in Product Recommendations

Hi @ankurkinex ,

 

can you please check and try below way to fetch product custom attribute values.

To fetch the value of attribute Use:

First, get Your Product Collection and then

$this->getProduct()->getAttributeText('attribute_text');e.g: $this->getProduct()->getAttributeText('metal_pads');

Or

$this->getProduct()->getResource()->getAttributeRawValue($this->getProduct()->getId(),'metal_pads',$this->_storeManager->getStore()->getId());

Hopefully, It will help you!

Problem Solved! Click Kudos & Accept as Solution!

Re: Fetch Custom Product Attribute in Product Recommendations

Hi @Nishu Jindal , the list fie in that module is a html. Knockout Js. This need to get in using knockout js