"product_code" => $product["product_code"] ); $freight_cost += $cart_item["Quantity"]*$product["shipping_freight"]; $strOptions=GetStrOptions( GetConfigurationByItemId( $tmp["id"] )); if ( trim($strOptions) != "" ) $tmp["name"].=" (".$strOptions.")"; if ( $product["min_order_amount"] > $cart_item["Quantity"] ) $tmp["min_order_amount"] = $product["min_order_amount"]; $cart_content[] = $tmp; $total_price += $cart_item["Quantity"]* GetPriceProductWithOption($variants, $shopping_cart_item["productID"]); } } } else //unauthorized user - get cart from session vars { $total_price = 0; //total cart value $cart_content = array(); //shopping cart items count if ( isset($_SESSION["gids"]) ) for ($j=0; $j 0) { for ($tmp1=0;$tmp1 $_SESSION["gids"][$j], "id" => $id, //$_SESSION["gids"][$j], "name" => $r[0], "quantity" => $_SESSION["counts"][$j], "free_shipping" => $r["free_shipping"], "costUC" => $costUC, "cost" => show_price($costUC * $_SESSION["counts"][$j]), "product_code" => $r["product_code"] ); $strOptions=GetStrOptions( $_SESSION["configurations"][$j] ); if ( trim($strOptions) != "" ) $tmp["name"].=" (".$strOptions.")"; $q_product = db_query( "select min_order_amount, shipping_freight from ".PRODUCTS_TABLE. " where productID=". (int)$_SESSION["gids"][$j] ); $product = db_fetch_row( $q_product ); if ( $product["min_order_amount"] > $_SESSION["counts"][$j] ) $tmp["min_order_amount"] = $product["min_order_amount"]; $freight_cost += $_SESSION["counts"][$j]*$product["shipping_freight"]; $cart_content[] = $tmp; $total_price += GetPriceProductWithOption( $_SESSION["configurations"][$j], $_SESSION["gids"][$j] )*$_SESSION["counts"][$j]; } } } } return array( "cart_content" => $cart_content, "total_price" => $total_price, "freight_cost" => $freight_cost ); } function cartCheckMinOrderAmount() { $cart_content = cartGetCartContent(); $cart_content = $cart_content["cart_content"]; foreach( $cart_content as $cart_item ) if ( isset($cart_item["min_order_amount"]) ) return false; return true; } function cartCheckMinTotalOrderAmount(){ $res = cartGetCartContent(); $d = oaGetDiscountPercent( $res, "" ); $order["order_amount"] = $res["total_price"] - ($res["total_price"]/100)*$d; if($order["order_amount"]= $count_to_order) //no item - add it to $gids array { $_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!