Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

300
 
377
 
377
 
product.php
_> 1414     var $_data = array();
  1515 
  1616     function osC_Product($id) {
<> 17 -      global $osC_Database, $osC_Services;
   17+      global $osC_Database, $osC_Services, $osC_Language;
1818 
  1919       if (!empty($id)) {
  2020         $Qproduct = $osC_Database->query('select p.products_id as id, p.products_quantity as quantity, p.products_image as image, p.products_price as price, p.products_tax_class_id as tax_class_id, p.products_date_added as date_added, p.products_date_available as date_available, p.manufacturers_id, pd.products_name as name, pd.products_description as description, pd.products_model as model, pd.products_keyword as keyword, pd.products_tags as tags, pd.products_url as url from :table_products p, :table_products_description pd where');
     
 !
3030         }
  3131 
  3232         $Qproduct->appendQuery('and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id');
<> 33 -        $Qproduct->bindInt(':language_id', $_SESSION['languages_id']);
   33+        $Qproduct->bindInt(':language_id', $osC_Language->getID());
3434         $Qproduct->execute();
  3535 
  3636         if ($Qproduct->numberOfRows() === 1) {
     
 !
5656             $Qattributes->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS);
  5757             $Qattributes->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES);
  5858             $Qattributes->bindInt(':products_id', $this->_data['id']);
<> 59 -            $Qattributes->bindInt(':language_id', $_SESSION['languages_id']);
  60 -            $Qattributes->bindInt(':language_id', $_SESSION['languages_id']);
   59+            $Qattributes->bindInt(':language_id', $osC_Language->getID());
   60+            $Qattributes->bindInt(':language_id', $osC_Language->getID());
6161             $Qattributes->execute();
  6262 
  6363             while ($Qattributes->next()) {
     
 !
7474             $Qavg = $osC_Database->query('select avg(reviews_rating) as rating from :table_reviews where products_id = :products_id and languages_id = :languages_id and reviews_status = 1');
  7575             $Qavg->bindTable(':table_reviews', TABLE_REVIEWS);
  7676             $Qavg->bindInt(':products_id', $this->_data['id']);
<> 77 -            $Qavg->bindInt(':languages_id', $_SESSION['languages_id']);
   77+            $Qavg->bindInt(':languages_id', $osC_Language->getID());
7878             $Qavg->execute();
  7979 
  8080             $this->_data['reviews_average_rating'] = round($Qavg->value('rating'));
     
 !
232232     }
  233233 
  234234     function incrementCounter() {
<> 235 -      global $osC_Database;
   235+      global $osC_Database, $osC_Language;
236236 
  237237       $Qupdate = $osC_Database->query('update :table_products_description set products_viewed = products_viewed+1 where products_id = :products_id and language_id = :language_id');
  238238       $Qupdate->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
  239239       $Qupdate->bindInt(':products_id', tep_get_prid($this->_data['id']));
<> 240 -      $Qupdate->bindInt(':language_id', $_SESSION['languages_id']);
   240+      $Qupdate->bindInt(':language_id', $osC_Language->getID());
241241       $Qupdate->execute();
  242242     }
  243243 
  244244     function &getListingNew() {
<> 245 -      global $osC_Database;
   245+      global $osC_Database, $osC_Language;
246246 
  247247       $Qproducts = $osC_Database->query('select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from :table_products p left join :table_manufacturers m on (p.manufacturers_id = m.manufacturers_id), :table_products_description pd where p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id order by p.products_date_added desc, pd.products_name');
  248248       $Qproducts->bindTable(':table_products', TABLE_PRODUCTS);
  249249       $Qproducts->bindTable(':table_manufacturers', TABLE_MANUFACTURERS);
  250250       $Qproducts->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
<> 251 -      $Qproducts->bindInt(':language_id', $_SESSION['languages_id']);
   251+      $Qproducts->bindInt(':language_id', $osC_Language->getID());
<_ 252252       $Qproducts->setBatchLimit($_GET['page'], MAX_DISPLAY_PRODUCTS_NEW);
  253253       $Qproducts->execute();
  254254