// Context part 8

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7633 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-15 16:41:39 +00:00
parent 20276404a8
commit 311e8ab964
10 changed files with 163 additions and 161 deletions
+1 -2
View File
@@ -208,7 +208,6 @@ class SceneCore extends ObjectModel
*/
public function getProducts($onlyActive = true, $id_lang = NULL, $liteResult = true, $context = null)
{
global $link;
if (!$context)
$context = Context::getContext();
$id_lang = is_null($id_lang) ? $context->language->id : $id_lang;
@@ -223,7 +222,7 @@ class SceneCore extends ObjectModel
foreach ($products AS &$product)
{
$product['details'] = new Product($product['id_product'], !$liteResult, $id_lang);
$product['link'] = $link->getProductLink($product['details']->id, $product['details']->link_rewrite, $product['details']->category, $product['details']->ean13);
$product['link'] = $context->link->getProductLink($product['details']->id, $product['details']->link_rewrite, $product['details']->category, $product['details']->ean13);
$cover = Product::getCover($product['details']->id);
if(is_array($cover))
$product = array_merge($cover, $product);