{ $_SESSION["gids"][] = $productID; $_SESSION["counts"][] = $count_to_order; $_SESSION["configurations"][]=$variants; } else return false; } else //authorized customer - get cart from database { $itemID=SearchConfigurationInDataBase($variants, $productID ); if ( $itemID !=-1 ) // if this configuration exists in database { $q = db_query("select Quantity FROM ".SHOPPING_CARTS_TABLE. " WHERE customerID=".(int)regGetIdByLogin($_SESSION["log"])." AND itemID=".(int)$itemID); $row = db_fetch_row($q); $quantity = $row[0]; if (CONF_CHECKSTOCK==0 || $quantity + $count_to_order <= $is) db_query("UPDATE ".SHOPPING_CARTS_TABLE. " SET Quantity=".(int)($row[0]+$count_to_order). " WHERE customerID=".(int)regGetIdByLogin($_SESSION["log"]). " AND itemID=".(int)$itemID); else return false; } else //insert new item { $count_to_order = $min_order_amount; if (CONF_CHECKSTOCK==0 || $is >= $count_to_order) { $itemID=InsertNewItem($variants, $productID ); InsertItemIntoCart($itemID); db_query("UPDATE ".SHOPPING_CARTS_TABLE. " SET Quantity=".(int)$count_to_order. " WHERE customerID=".(int)regGetIdByLogin($_SESSION["log"]). " AND itemID=".(int)$itemID); } else return false; } } return true; } // ***************************************************************************** // Purpose // Inputs $customerID - customer ID // Remarks // Returns returns true if cart is empty for this customer function cartCartIsEmpty( $log ) { $customerID = regGetIdByLogin( $log ); if ( (int)$customerID > 0 ) { $customerID = (int)$customerID; $q_count = db_query( "select count(*) from ".SHOPPING_CARTS_TABLE." where customerID=".(int)$customerID ); $count = db_fetch_row( $q_count ); $count = $count[0]; return ( $count == 0 ); } else return true; } ?> ERROR: Couldn't find language file!