Example #1
0
 function getProducts()
 {
     $history = array();
     if (isset($this->visits['products']) && empty($this->visits['products']) === false) {
         $counter = 0;
         foreach ($this->visits['products'] as $k => $v) {
             $counter++;
             $OSCOM_Product = new Product($v['id']);
             $OSCOM_Category = new Category($OSCOM_Product->getCategoryID());
             $history[] = array('name' => $OSCOM_Product->getTitle(), 'id' => $OSCOM_Product->getID(), 'keyword' => $OSCOM_Product->getKeyword(), 'price' => SERVICE_RECENTLY_VISITED_SHOW_PRODUCT_PRICES == '1' ? $OSCOM_Product->getPriceFormated(true) : '', 'image' => $OSCOM_Product->getImage(), 'category_name' => $OSCOM_Category->getTitle(), 'category_path' => $OSCOM_Category->getPath());
             if ($counter == SERVICE_RECENTLY_VISITED_MAX_PRODUCTS) {
                 break;
             }
         }
     }
     return $history;
 }