  |
135 | 135 | | $Qlisting->appendQuery(', sum(tr.tax_rate) as tax_rate'); |
| |
136 | 136 | | } |
| |
137 | 137 | | |
  |
138 | | - | $Qlisting->appendQuery('from :table_products p left join :table_manufacturers m using(manufacturers_id), :table_products_description pd left join :table_specials s on p.products_id = s.products_id, :table_categories c, :table_products_to_categories p2c'); |
| |
| 138 | + | $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)'); |
|
139 | 139 | | $Qlisting->bindTable(':table_products', TABLE_PRODUCTS); |
| |
140 | 140 | | $Qlisting->bindTable(':table_manufacturers', TABLE_MANUFACTURERS); |
  |
141 | | - | $Qlisting->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION); |
|
142 | 141 | | $Qlisting->bindTable(':table_specials', TABLE_SPECIALS); |
  |
143 | | - | $Qlisting->bindTable(':table_categories', TABLE_CATEGORIES); |
| |
144 | | - | $Qlisting->bindTable(':table_products_to_categories', TABLE_PRODUCTS_TO_CATEGORIES); |
|
145 | 142 | | |
| |
146 | 143 | | if (($this->hasPriceSet('from') || $this->hasPriceSet('to')) && (DISPLAY_PRICE_WITH_TAX == 'true')) { |
| |
147 | 144 | | if ($osC_Customer->isLoggedOn()) { |
| |
|
|
 |
… |
|
159 | 156 | | $Qlisting->bindInt(':zone_id', $customer_zone_id); |
| |
160 | 157 | | } |
| |
161 | 158 | | |
  |
| 159 | + | $Qlisting->appendQuery(', :table_products_description pd, :table_categories c, :table_products_to_categories p2c'); |
| |
| 160 | + | $Qlisting->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION); |
| |
| 161 | + | $Qlisting->bindTable(':table_categories', TABLE_CATEGORIES); |
| |
| 162 | + | $Qlisting->bindTable(':table_products_to_categories', TABLE_PRODUCTS_TO_CATEGORIES); |
| |
| 163 | + | |
  |
162 | 164 | | $Qlisting->appendQuery('where p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id'); |
| |
163 | 165 | | $Qlisting->bindInt(':language_id', $_SESSION['languages_id']); |
| |
164 | 166 | | |