君の力が必要!製品 ID を使用して画像へのパスを取得するにはどうすればよいですか?
Link :: getImageLink () - $ name の最初のパラメーター、わかりませんか?
$searchResults = Search::find((int)(Tools::getValue('id_lang')), $query, 1, 10, 'position', 'desc', true);
foreach ($searchResults as &$product)
{
$product['product_link'] = $this->context->link->getProductLink($product['id_product'], $product['prewrite'], $product['crewrite']);
$imageid = Product::getCover($product['id_product']);
// there i have image ID, how get image path $imagepath?
$product['image'] = $imagepath;
}
die(Tools::jsonEncode($searchResults));