How to get all variants under particular object?

Hi All,

Help me to extract all variants of particular object since i’m new to pimcore. I tried extracting by this line


It returned count as expected but all values are null though Variants have values.

Karthikeyan B

 public function getVariants()
    $list = new Product\Listing();
    $list->setCondition('o_parentId = ?', $this->getId());

    return $list->load();

@pdchaudhary ( it works and we also need to set the flag to read the inherited field also.