Access Supplier Media in Catalog Detail page

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
kartikbhat
Posts: 40
Joined: 02 Dec 2021, 17:18

Access Supplier Media in Catalog Detail page

Post by kartikbhat » 02 Mar 2023, 08:22

I have added text and a media to a particular supplier from admin panel and I need to display them in a Catalog Detail page on front end....
SupplierMedia.png
SupplierMedia.png (159.13 KiB) Viewed 609 times
How to access them I am not getting...
Please help me to access them

TIA :)

User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: Access Supplier Media in Catalog Detail page

Post by aimeos » 05 Mar 2023, 08:57

In the catalog detail page, you have access to the supplier and related data using:

Code: Select all

foreach( $this->detailProductItem->getRefItems( 'supplier' ) as $supplier )
{
	foreach( $supplier->getRefItems( 'media' ) as $media ) {
		// $media->getUrl()
	}
	foreach( $supplier->getRefItems( 'text' ) as $text ) {
		// $text->getContent()
	}
}
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply