<?php

$goods = nc_netshop::get_instance()->goodslist_recent->get_all('DESC', 12);

if (count($goods)) {
    echo '<div class="tpl-widget-netshop-viewed-by-user">',
         '<h2>Вы недавно смотрели</h2>',
         '<div class="tpl-block-list-objects">';

    foreach ($goods as $item_data) {
        echo nc_core::get_object()->widget->generate('netshop_item', array(
            'Component_ID' => $item_data['Class_ID'],
            'Item_ID' => $item_data['Item_ID'],
        ));
    }

    echo '</div></div>';
}
