Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

298
 
299
 
299
 
recently_visited.php
_> 147147           $Qcategory->bindInt(':language_id', $_SESSION['languages_id']);
  148148           $Qcategory->execute();
  149149 
<> 150 -          $products_name = tep_get_products_name($this->visits['products'][$k]['id']);
   150+          $Qproduct = $osC_Database->query('select p.products_price, p.products_tax_class_id, p.products_image, pd.products_name, pd.products_keyword from :table_products p, :table_products_description pd where p.products_id = :products_id and p.products_status = 1 and pd.products_id = :products_id and pd.language_id = :language_id');
   151+          $Qproduct->bindTable(':table_products', TABLE_PRODUCTS);
   152+          $Qproduct->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
   153+          $Qproduct->bindInt(':products_id', $this->visits['products'][$k]['id']);
   154+          $Qproduct->bindInt(':products_id', $this->visits['products'][$k]['id']);
   155+          $Qproduct->bindInt(':language_id', $_SESSION['languages_id']);
   156+          $Qproduct->execute();
151157 
<> 152 -          if ( (SERVICE_RECENTLY_VISITED_SHOW_IMAGE == 'True') or (SERVICE_RECENTLY_VISITED_SHOW_PRICE == 'True') ) {
  153 -            $Qproduct = $osC_Database->query('select products_price, products_tax_class_id, products_image from :table_products where products_status = 1 and products_id = :products_id');
  154 -            $Qproduct->bindTable(':table_products', TABLE_PRODUCTS);
  155 -            $Qproduct->bindInt(':products_id', $this->visits['products'][$k]['id']);
  156 -            $Qproduct->execute();
  157 -
  158 -            if (SERVICE_RECENTLY_VISITED_SHOW_PRICE == 'True') {
  159 -              if ( ($osC_Services->isStarted('specials')) && ($new_price = $osC_Specials->getPrice($this->visits['products'][$k]['id'])) ) {
  160 -                $products_price = '<s>' . $osC_Currencies->displayPrice($Qproduct->value('products_price'), $Qproduct->valueInt('products_tax_class_id')) . '</s> <span class="productSpecialPrice">' . $osC_Currencies->displayPrice($new_price, $Qproduct->valueInt('products_tax_class_id')) . '</span>';
  161 -              } else {
  162 -                $products_price = $osC_Currencies->displayPrice($Qproduct->value('products_price'), $Qproduct->valueInt('products_tax_class_id'));
  163 -              }
   158+          if (SERVICE_RECENTLY_VISITED_SHOW_PRICE == 'True') {
   159+            if ( ($osC_Services->isStarted('specials')) && ($new_price = $osC_Specials->getPrice($this->visits['products'][$k]['id'])) ) {
   160+              $products_price = '<s>' . $osC_Currencies->displayPrice($Qproduct->value('products_price'), $Qproduct->valueInt('products_tax_class_id')) . '</s> <span class="productSpecialPrice">' . $osC_Currencies->displayPrice($new_price, $Qproduct->valueInt('products_tax_class_id')) . '</span>';
   161+            } else {
   162+              $products_price = $osC_Currencies->displayPrice($Qproduct->value('products_price'), $Qproduct->valueInt('products_tax_class_id'));
164163             }
  165164           }
  166165 
<> 167 -          $history[] = array('name' => $products_name,
  168 -                             'page' => ($this->visits['products'][$k]['page_name']) ? $this->visits['products'][$k]['page_name'] : FILENAME_DEFAULT,
   166+          $history[] = array('name' => $Qproduct->value('products_name'),
169167                              'id' => $this->visits['products'][$k]['id'],
<> 170 -                             'get_params' => $this->visits['products'][$k]['get_params'],
   168+                             'keyword' => $Qproduct->value('products_keyword'),
171169                              'price' => (SERVICE_RECENTLY_VISITED_SHOW_PRICE == 'True') ? $products_price : '',
<> 172 -                             'image' => (SERVICE_RECENTLY_VISITED_SHOW_IMAGE == 'True') ? $Qproduct->value('products_image') : '',
   170+                             'image' => $Qproduct->value('products_image'),
173171                              'category_name' =>  $Qcategory->value('categories_name'),
  174172                              'category_path' => $cpath
  175173                             );
     
 !
192190     }
  193191 
  194192     function getCategories() {
<> 195 -      global $osC_Database;
   193+      global $osC_CategoryTree;
196194 
  197195       $history = array();
  198196 
  199197       if (isset($this->visits['categories']) && (empty($this->visits['categories']) === false)) {
<> 200 -        $osC_CategoryTree = new osC_CategoryTree();
  201 -
202198         $counter = 0;
  203199 
  204200         foreach ($this->visits['categories'] as $k => $v) {
  205201           $counter++;
  206202 
<> 207 -          $cpath = $osC_CategoryTree->buildBreadcrumb($this->visits['categories'][$k]['id']);
  208 -          $parts = explode("_", $cpath);
   203+          $osC_Category = new osC_Category($v['id']);
209204 
<> 210 -          if (sizeof($parts) > 1) {
  211 -            $Qpcategory = $osC_Database->query('select categories_name, categories_id from :table_categories_description where categories_id = :categories_id and  language_id = :language_id');
  212 -            $Qpcategory->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);
  213 -            $Qpcategory->bindInt(':categories_id', $parts[0]);
  214 -            $Qpcategory->bindInt(':language_id', $_SESSION['languages_id']);
  215 -            $Qpcategory->execute();
  216 -
  217 -            $Qcategory = $osC_Database->query('select categories_name from :table_categories_description where categories_id = :categories_id and  language_id = :language_id');
  218 -            $Qcategory->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);
  219 -            $Qcategory->bindInt(':categories_id', $parts[sizeof($parts)-1]);
  220 -            $Qcategory->bindInt(':language_id', $_SESSION['languages_id']);
  221 -            $Qcategory->execute();
  222 -          } else {
  223 -            $Qpcategory = false;
  224 -
  225 -            $Qcategory = $osC_Database->query('select categories_name from :table_categories_description where categories_id = :categories_id and  language_id = :language_id');
  226 -            $Qcategory->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);
  227 -            $Qcategory->bindInt(':categories_id', $parts[0]);
  228 -            $Qcategory->bindInt(':language_id', $_SESSION['languages_id']);
  229 -            $Qcategory->execute();
   205+          if ($osC_Category->hasParent()) {
   206+            $osC_CategoryParent = new osC_Category($osC_Category->getParent());
230207           }
  231208 
<> 232 -          $history[]  = array('parents_name' => ($Qpcategory) ? $Qpcategory->value('categories_name') : '',
  233 -                              'parents_id' => ($Qpcategory) ? $Qpcategory->value('categories_id') : '',
  234 -                              'category_name' => $Qcategory->value('categories_name'),
  235 -                              'category_id' => $cpath
   209+          $history[]  = array('parents_name' => ($osC_Category->hasParent()) ? $osC_CategoryParent->getTitle() : '',
   210+                              'parents_id' => ($osC_Category->hasParent()) ? $osC_CategoryParent->getID() : '',
   211+                              'category_name' => $osC_Category->getTitle(),
   212+                              'category_id' => $osC_Category->getPath()
<_ 236213                              );
  237214 
  238215           if ($counter == MAX_RECENTLY_VISITED_CATEGORIES) {