Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

477
 
703
 
703
 
shopping_cart.php
_> 8181       $products_id_string = tep_get_uprid($products_id, $attributes);
  8282       $products_id = tep_get_prid($products_id_string);
  8383 
<> 84 -      if (is_numeric($products_id) && is_numeric($qty)) {
   84+      $attributes_pass_check = true;
   85+
   86+      if (is_array($attributes)) {
   87+        reset($attributes);
   88+        while (list($option, $value) = each($attributes)) {
   89+          if (!is_numeric($option) || !is_numeric($value)) {
   90+            $attributes_pass_check = false;
   91+            break;
   92+          }
   93+        }
   94+      }
   95+
   96+      if (is_numeric($products_id) && is_numeric($qty) && ($attributes_pass_check == true)) {
8597         $check_product_query = tep_db_query("select products_status from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
  8698         $check_product = tep_db_fetch_array($check_product_query);
  8799 
     
 !
122134       $products_id_string = tep_get_uprid($products_id, $attributes);
  123135       $products_id = tep_get_prid($products_id_string);
  124136 
<> 125 -      if (is_numeric($products_id) && isset($this->contents[$products_id_string]) && is_numeric($quantity)) {
   137+      $attributes_pass_check = true;
   138+
   139+      if (is_array($attributes)) {
   140+        reset($attributes);
   141+        while (list($option, $value) = each($attributes)) {
   142+          if (!is_numeric($option) || !is_numeric($value)) {
   143+            $attributes_pass_check = false;
   144+            break;
   145+          }
   146+        }
   147+      }
   148+
   149+      if (is_numeric($products_id) && isset($this->contents[$products_id_string]) && is_numeric($quantity) && ($attributes_pass_check == true)) {
<_ 126150         $this->contents[$products_id_string] = array('qty' => $quantity);
  127151 // update database
  128152         if (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . (int)$quantity . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "'");