This commit is contained in:
Marion Muszynski 2016-11-30 12:53:19 +01:00
parent 2ac3271169
commit 284aeb5903

View File

@ -67,12 +67,12 @@ WHERE (pl.name LIKE \'%'.pSQL($query).'%\' OR p.reference LIKE \'%'.pSQL($query)
$link = new Link();
if ($items)
foreach ($items AS $item){
$img_path = '';
if(isset($item['id_image']) && !empty($item['id_image'])){
//$img_path = '';
//if(isset($item['id_image']) && !empty($item['id_image'])){
// $image_obj = new Image((int)$item['id_image']);
// $img_path = (isset($image_obj)?$image_obj->getExistingImgPath():'');
$img_path = $link->getImageLink($item['link_rewrite'], (int)$item['id_image'], 'small');
}
//}
$img_path = $link->getImageLink($item['link_rewrite'], (int)$item['id_image'], 'small');
echo trim($item['name']).(!empty($item['reference']) ? ' (ref: '.$item['reference'].')' : '').'|'.(int)($item['id_product']).(!empty($img_path) ?'|'.($img_path):'')."\n";
}