  |
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_images i on (p.products_id = i.for_id and i.images_groups_id = :images_groups_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.products_images_groups_id = :products_images_groups_id)'); |
|
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 | | - | $Qlisting->bindTable(':table_images', TABLE_IMAGES); |
| |
148 | | - | $Qlisting->bindInt(':images_groups_id', $osC_Image->getID('default')); |
| |
| 147 | + | $Qlisting->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES); |
| |
| 148 | + | $Qlisting->bindInt(':products_images_groups_id', $osC_Image->getID('default')); |
  |
149 | 149 | | |
| |
150 | 150 | | if (($this->hasPriceSet('from') || $this->hasPriceSet('to')) && (DISPLAY_PRICE_WITH_TAX == '1')) { |
| |
151 | 151 | | if ($osC_Customer->isLoggedOn()) { |