  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: shopping_cart.php 733 2006-08-20 15:32:32Z hpdl $ |
| |
| 3 | + | $Id: shopping_cart.php 734 2006-08-20 17:56:47Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
126 | 126 | | |
| |
127 | 127 | | $Qspecials = $osC_Database->query('select specials_new_products_price from :table_specials where products_id = :products_id and status = 1'); |
| |
128 | 128 | | $Qspecials->bindTable(':table_specials', TABLE_SPECIALS); |
  |
129 | | - | $Qspecials->bindInt(':products_id', tep_get_prid($Qproducts->value('products_id'))); |
| |
| 129 | + | $Qspecials->bindInt(':products_id', osc_get_product_id($Qproducts->value('products_id'))); |
|
130 | 130 | | $Qspecials->execute(); |
| |
131 | 131 | | |
| |
132 | 132 | | if ($Qspecials->numberOfRows() > 0) { |
| |
|
|
 |
… |
|
152 | 152 | | $Qattributes->bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES); |
| |
153 | 153 | | $Qattributes->bindInt(':customers_id', $osC_Customer->getID()); |
| |
154 | 154 | | $Qattributes->bindValue(':products_id', $Qproducts->value('products_id')); |
  |
155 | | - | $Qattributes->bindInt(':products_id', tep_get_prid($Qproducts->value('products_id'))); |
| |
| 155 | + | $Qattributes->bindInt(':products_id', osc_get_product_id($Qproducts->value('products_id'))); |
|
156 | 156 | | $Qattributes->bindInt(':language_id', $osC_Language->getID()); |
| |
157 | 157 | | $Qattributes->bindInt(':language_id', $osC_Language->getID()); |
| |
158 | 158 | | $Qattributes->execute(); |
| |
|
|
 |
… |
|
217 | 217 | | function add($products_id, $attributes = '', $quantity = '') { |
| |
218 | 218 | | global $osC_Database, $osC_Language, $osC_Customer, $osC_Image; |
| |
219 | 219 | | |
  |
220 | | - | $products_id_string = tep_get_uprid($products_id, $attributes); |
| |
221 | | - | $products_id = tep_get_prid($products_id_string); |
| |
| 220 | + | $products_id_string = osc_get_product_id_string($products_id, $attributes); |
| |
| 221 | + | $products_id = osc_get_product_id($products_id_string); |
|
222 | 222 | | |
| |
223 | 223 | | if (is_numeric($products_id)) { |
| |
224 | 224 | | $Qcheck = $osC_Database->query('select p.products_price, p.products_tax_class_id, p.products_weight, p.products_weight_class, p.products_status, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag) where p.products_id = :products_id'); |
| |
|
|
 |
… |
|
415 | 415 | | } |
| |
416 | 416 | | |
| |
417 | 417 | | function generateCartID($length = 5) { |
  |
418 | | - | return tep_create_random_value($length, 'digits'); |
| |
| 418 | + | return osc_create_random_string($length, 'digits'); |
|
419 | 419 | | } |
| |
420 | 420 | | |
| |
421 | 421 | | function hasCartID() { |
| |
|
|
 |
… |
|
499 | 499 | | |
| |
500 | 500 | | $Qstock = $osC_Database->query('select products_quantity from :table_products where products_id = :products_id'); |
| |
501 | 501 | | $Qstock->bindTable(':table_products', TABLE_PRODUCTS); |
  |
502 | | - | $Qstock->bindInt(':products_id', tep_get_prid($products_id)); |
| |
| 502 | + | $Qstock->bindInt(':products_id', osc_get_product_id($products_id)); |
  |
503 | 503 | | $Qstock->execute(); |
| |
504 | 504 | | |
| |
505 | 505 | | if (($Qstock->valueInt('products_quantity') - $this->_contents[$products_id]['quantity']) > 0) { |