Retrieve Catalogs
Posted: 29 Nov 2020, 09:39
Hi guys,
I am trying to retrieve the catalogs and in such a case I am using the below code.
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?
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' );
}
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?