View Single Post
  #6  
Old 07-12-2018, 04:45 AM
 
Soptareanu @Alex Soptareanu @Alex is offline
 

Advanced Member
  
Join Date: Apr 2018
Posts: 39
 

Default Re: Pull product-variant attributes

Quote:
Originally Posted by tony_sologubov
Hi @Soptareanu @Alex,

$model->getAttributeValueS() does not return an empty object. It returns collection of objects, so you should cycle through its child elements and call something like this:

Code:
foreach ($model->getAttributeValueS() as $attributeValue) { $result = $result . ' ' . $attributeValue->asString(); }

See more in \XLite\Model\AttributeValue\AttributeValueSelect class.

Tony
It works. Thanks a lot.
__________________
Soptareanu Alex
Reply With Quote