Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Did This Attached Code Cause The Error


gaspower

Recommended Posts

Hello,

 

I have replaced in shopping_cart.php the following line,

 

$products_name .= $stock_check;

 

to this,

 

$products_name .= $stock_check . " (Only " .tep_get_products_stock($products[$i]['id']) . " in our stock)";

$products[$i]['quantity'] = tep_get_products_stock($products[$i]['id']);

$cart->update_quantity($products[$i]['id'],$products[$i]['quantity']);

 

Which was and does the following. Only allows maximum the amount of an item in the database to be entered into the quantity field in the shopping cart. This was to help a negative balance in the database. But I started having database issues. Not at first, but I would check item quantities, and they would change from zero to weird numbers like -18, -10 ect?? Also the pricing for the products would all get set to zero?? Is there something in this code written incorrectly to cause this issue?

 

Thanks JR

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...