  |
136 | 136 | | |
| |
137 | 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'); |
| |
138 | 138 | | |
  |
139 | | - | if (($this->hasPriceSet('from') || $this->hasPriceSet('to')) && (DISPLAY_PRICE_WITH_TAX == 'true')) { |
| |
| 139 | + | if (($this->hasPriceSet('from') || $this->hasPriceSet('to')) && (DISPLAY_PRICE_WITH_TAX == '1')) { |
|
140 | 140 | | $Qlisting->appendQuery(', sum(tr.tax_rate) as tax_rate'); |
| |
141 | 141 | | } |
| |
142 | 142 | | |
| |
|
|
 |
… |
|
145 | 145 | | $Qlisting->bindTable(':table_manufacturers', TABLE_MANUFACTURERS); |
| |
146 | 146 | | $Qlisting->bindTable(':table_specials', TABLE_SPECIALS); |
| |
147 | 147 | | |
  |
148 | | - | if (($this->hasPriceSet('from') || $this->hasPriceSet('to')) && (DISPLAY_PRICE_WITH_TAX == 'true')) { |
| |
| 148 | + | if (($this->hasPriceSet('from') || $this->hasPriceSet('to')) && (DISPLAY_PRICE_WITH_TAX == '1')) { |
|
149 | 149 | | if ($osC_Customer->isLoggedOn()) { |
| |
150 | 150 | | $customer_country_id = $osC_Customer->getCountryID(); |
| |
151 | 151 | | $customer_zone_id = $osC_Customer->getZoneID(); |
| |
|
|
 |
… |
|
221 | 221 | | } |
| |
222 | 222 | | } |
| |
223 | 223 | | |
  |
224 | | - | if (DISPLAY_PRICE_WITH_TAX == 'true') { |
| |
| 224 | + | if (DISPLAY_PRICE_WITH_TAX == '1') { |
|
225 | 225 | | if ($this->_price_from > 0) { |
| |
226 | 226 | | $Qlisting->appendQuery('and (if(s.status, s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= :price_from)'); |
| |
227 | 227 | | $Qlisting->bindFloat(':price_from', $this->_price_from); |
| |
|
|
 |
… |
|
243 | 243 | | } |
| |
244 | 244 | | } |
| |
245 | 245 | | |
  |
246 | | - | if (($this->hasPriceSet('from') || $this->hasPriceSet('to')) && (DISPLAY_PRICE_WITH_TAX == 'true')) { |
| |
| 246 | + | if (($this->hasPriceSet('from') || $this->hasPriceSet('to')) && (DISPLAY_PRICE_WITH_TAX == '1')) { |
  |
247 | 247 | | $Qlisting->appendQuery('group by p.products_id, tr.tax_priority'); |
| |
248 | 248 | | } |
| |
249 | 249 | | |