Catalog media get configuration options
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Catalog media get configuration options
Hi! I wanted to do slider of catalog media. How i can get configuration options?
Dump does not contain this data.
Dump does not contain this data.
Code: Select all
Aimeos\MShop\Media\Item\Standard {#2087 ▼
-langid: "ru"
-prefix: "media."
-available: true
-modified: false
#bdata: array:14 [▼
"media.id" => "33"
"media.siteid" => "1."
"media.languageid" => null
"media.type" => "stage"
"media.url" => "files/8/a/8acc69c8_1669842697.jpg"
"media.label" => "yes.jpg"
"media.status" => "1"
"media.mimetype" => "image/jpeg"
"media.domain" => "catalog"
"media.previews" => array:3 [▼
240 => "preview/8/7/87721256_713301927.jpg"
720 => "preview/2/3/233eee02_679499300.jpg"
1280 => "preview/d/6/d6ed2fd0_1213870932.jpg"
]
"media.mtime" => "2020-11-04 13:09:06"
"media.editor" => "admin@admin.com"
"media.ctime" => "2020-11-04 12:55:45"
".languageid" => "ru"
]
-listItems: []
-listRefItems: []
-listRmItems: []
-listPrepared: false
-listRmMap: []
-listMap: []
-listMax: 0
-propItems: []
-propRmItems: []
-propMax: 0
}
Re: Catalog media get configuration options
These settings aren't part of the media item but of the list item referencing the media item. To get that data, you must use:
Code: Select all
foreach( $product->getListItems( 'media', 'default', 'stage' ) as $listItem ) {
$listItem->getConfig(); // all key/value pairs
$listItem->getConfigValue( 'to' ); // single value for 'to'
$listItem->getRefItem(); // media item
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Catalog media get configuration options
I need home page, $product no valueaimeos wrote: ↑07 Nov 2020, 08:18Code: Select all
$product->getListItems( 'media', 'default', 'stage' )
Code: Select all
$this->homeTree->getListItems( 'media', 'default', 'stage' )
Re: Catalog media get configuration options
Check if
returns an image at all. If not, the images are not loaded at all and there's something wrong. The code that loads the categories and their images is here:
https://github.com/aimeos/ai-client-htm ... #L438-L462
Code: Select all
$this->homeTree->getListItems( 'media' )
https://github.com/aimeos/ai-client-htm ... #L438-L462
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Catalog media get configuration options
aimeos wrote: ↑10 Nov 2020, 09:59 Check ifreturns an image at all. If not, the images are not loaded at all and there's something wrong. The code that loads the categories and their images is here:Code: Select all
$this->homeTree->getListItems( 'media' )
https://github.com/aimeos/ai-client-htm ... #L438-L462
Code: Select all
$this->homeTree->getListItems( 'media' )