Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

554
 
608
 
608
 
search.php
_> 55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
  77 
<> 8 -  Copyright (c) 2005 osCommerce
   8+  Copyright (c) 2006 osCommerce
99 
  1010   Released under the GNU General Public License
  1111 */
     
 !
132132     }
  133133 
  134134     function &execute() {
<> 135 -      global $osC_Database, $osC_Customer, $osC_Currencies, $osC_Language;
   135+      global $osC_Database, $osC_Customer, $osC_Currencies, $osC_Language, $osC_Image;
136136 
<> 137 -      $Qlisting = $osC_Database->query('select SQL_CALC_FOUND_ROWS distinct p.*, pd.*, m.*, if(s.status, s.specials_new_products_price, null) as specials_new_products_price, if(s.status, s.specials_new_products_price, p.products_price) as final_price');
   137+      $Qlisting = $osC_Database->query('select SQL_CALC_FOUND_ROWS distinct p.*, pd.*, m.*, i.image, if(s.status, s.specials_new_products_price, null) as specials_new_products_price, if(s.status, s.specials_new_products_price, p.products_price) as final_price');
138138 
  139139       if (($this->hasPriceSet('from') || $this->hasPriceSet('to')) && (DISPLAY_PRICE_WITH_TAX == '1')) {
  140140         $Qlisting->appendQuery(', sum(tr.tax_rate) as tax_rate');
  141141       }
  142142 
<> 143 -      $Qlisting->appendQuery('from :table_products p left join :table_manufacturers m using(manufacturers_id) left join :table_specials s on (p.products_id = s.products_id)');
   143+      $Qlisting->appendQuery('from :table_products p left join :table_manufacturers m using(manufacturers_id) left join :table_specials s on (p.products_id = s.products_id) left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag)');
144144       $Qlisting->bindTable(':table_products', TABLE_PRODUCTS);
  145145       $Qlisting->bindTable(':table_manufacturers', TABLE_MANUFACTURERS);
  146146       $Qlisting->bindTable(':table_specials', TABLE_SPECIALS);
<>  147+      $Qlisting->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES);
   148+      $Qlisting->bindInt(':default_flag', 1);
<_ 147149 
  148150       if (($this->hasPriceSet('from') || $this->hasPriceSet('to')) && (DISPLAY_PRICE_WITH_TAX == '1')) {
  149151         if ($osC_Customer->isLoggedOn()) {