需要您的幫助!如何通過產品ID獲取圖像路徑?獲取圖像路徑prestashop 1.5
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));