I created a new model : Supplier. And in product page I tried to get the supplier details but I get an error :
<?php foreach ($this->product->getSuppliers() as $item): ?> <?php foreach ($item->getLocalizedFields()->getItems() as $supplier): ?> <p><?php echo $supplier->getEmail(); ?></p> <?php endforeach; ?> <?php endforeach; ?>
And I get the error :
# Call to undefined method getItems in class Pimcore\Model\DataObject\Localizedfield
Please help me. Thx in advance.