Page 1 of 1

Retrieve Catalogs

Posted: 29 Nov 2020, 09:39
by adityabanerjee
Hi guys,

I am trying to retrieve the catalogs and in such a case I am using the below code.

Code: Select all

$context = app('aimeos.context')->get();
$manager = \Aimeos\MShop::create( $context, 'catalog' );
$items = $manager->search( $manager->filter(), ['media', 'text'] );

foreach( $items as $item )
{
   $textItem = $item->getRefItems( 'text' );
   if( $textItem->getLanguageId() === 'ar' ) { ... }
   $mediaItem = $item->getRefItems( 'media' );
}
but this is giving me error -:

Symfony\Component\Debug\Exception\FatalThrowableError Too few arguments to function Aimeos\MW\Common\Manager\Base::filter(), 0 passed and exactly 1 expected

What could be done in such a case?

Re: Retrieve Catalogs

Posted: 30 Nov 2020, 13:43
by aimeos
Which Aimeos version do you use? Please share details about your environment.