  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: shopping_cart.php 809 2006-08-27 01:02:21Z hpdl $ |
| |
| 3 | + | $Id: shopping_cart.php 810 2006-08-27 01:13:17Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
162 | 162 | | $Qattributes->bindInt(':language_id', $osC_Language->getID()); |
| |
163 | 163 | | $Qattributes->execute(); |
| |
164 | 164 | | |
  |
165 | | - | while ($Qattributes->next()) { |
| |
| 165 | + | if ($Qattributes->numberOfRows() > 0) { |
|
166 | 166 | | $this->_contents[$Qproducts->value('products_id')]['attributes'][$option_id] = array('options_id' => $option_id, |
| |
167 | 167 | | 'options_values_id' => $value_id, |
| |
168 | 168 | | 'products_options_name' => $Qattributes->value('products_options_name'), |
| |
|
|
 |
… |
|
175 | 175 | | } else { |
| |
176 | 176 | | $this->_contents[$Qproducts->value('products_id')]['final_price'] -= $Qattributes->value('options_values_price'); |
| |
177 | 177 | | } |
  |
| 178 | + | } else { |
| |
| 179 | + | unset($this->_contents[$Qproducts->value('products_id')]); |
| |
| 180 | + | continue 2; // skip product |
  |
178 | 181 | | } |
| |
179 | 182 | | } |
| |
180 | 183 | | } |