getCurrentLanguage(); $L = Core_Language::getInstance(); $goods = new Products(); $fields['id'] = $goods->getProductsTop(); if(!empty($fields['id'])) $topGoods = $goods->getList($fields); $topSalesArray = $goods->getProductsSales(20,$days); $fields['id'] = $topSalesArray['ids']; $params['limit']=true; $params['offset'] = 0; $params['length'] =200; $params['order'] =''; $params['all'] = 1; $topSales = $goods -> getList($fields,$params); $items=array(); foreach($topSales['data'] as $item) { $items[$item['id']]=$item; } ?>

Str('Top')?>

Str('Most purchased products')?>
$purchases) { $item = $items[$item_id]; //print_r($item); $thumb = $products->getThumbnail($item['id'],'t'); $link = $products -> getLink($item['id']); $title= htmlspecialchars($L->StrT('goods','title', $item['id'], $item['title'])); ?>
>
EUR
Str('purchases')?>