  |
140 | 140 | | $Qlisting->appendQuery(', sum(tr.tax_rate) as tax_rate'); |
| |
141 | 141 | | } |
| |
142 | 142 | | |
  |
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.products_images_groups_id = :products_images_groups_id and i.default_flag = :default_flag)'); |
| |
| 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)'); |
|
144 | 144 | | $Qlisting->bindTable(':table_products', TABLE_PRODUCTS); |
| |
145 | 145 | | $Qlisting->bindTable(':table_manufacturers', TABLE_MANUFACTURERS); |
| |
146 | 146 | | $Qlisting->bindTable(':table_specials', TABLE_SPECIALS); |
| |
147 | 147 | | $Qlisting->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES); |
  |
148 | | - | $Qlisting->bindInt(':products_images_groups_id', $osC_Image->getID('default')); |
  |
149 | 148 | | $Qlisting->bindInt(':default_flag', 1); |
| |
150 | 149 | | |
| |
151 | 150 | | if (($this->hasPriceSet('from') || $this->hasPriceSet('to')) && (DISPLAY_PRICE_WITH_TAX == '1')) { |