#заглушка function allow_shipping_to_address(){ return true; } /** * Convert from one Measurement to another Measurement * * @param unknown_type $_Units * @param unknown_type $_From * @param unknown_type $_To */ function _convertMeasurement($_Units, $_From, $_To){ switch (strtolower($_From).'_'.strtolower($_To)){ case 'lb_kg': case 'lbs_kgs': case 'lbs_kg': case 'lb_kgs': $_Units = $_Units/2.2046; break; case 'kg_lb': case 'kg_lbs': case 'kgs_lb': case 'kgs_lbs': $_Units = $_Units*2.2046; break; case 'g_lb': case 'g_lbs': $_Units = $_Units/1000*2.2046; break; case 'lb_g': case 'lbs_g': $_Units = $_Units/2.2046*1000; break; case 'g_kg': case 'g_kgs': $_Units = $_Units/1000; } return $_Units; } function _getOrderWeight(&$Order){ $TC = count($Order['orderContent']['cart_content']); $OrderWeight = 0; $ShippingProducts = 0; for( $i = 0; $i<$TC; $i++ ){ $Product = GetProduct($Order['orderContent']['cart_content'][$i]['productID']); if($Product['free_shipping'])continue; $ShippingProducts++; if(!isset($Product['weight']))continue; if(!$Product['weight'])continue; $OrderWeight += $Order['orderContent']['cart_content'][$i]['quantity']*$Product['weight']; } if($OrderWeight<=0 && $ShippingProducts)$OrderWeight=0.1; return $OrderWeight; } function _getOrderpSumm(&$Order){ $TC = count($Order['orderContent']['cart_content']); $OrderpSumm = 0; $ShippingProducts = 0; for( $i = 0; $i<$TC; $i++ ){ $Product = GetProduct($Order['orderContent']['cart_content'][$i]['productID']); if($Product['free_shipping'])continue; $ShippingProducts++; $OrderpSumm += $Order['orderContent']['cart_content'][$i]['quantity']*$Order['orderContent']['cart_content'][$i]['costUC']; } return $OrderpSumm; } function _getShippingProducts($_Order){ $Products = array(); $_TC = count($_Order['orderContent']['cart_content'])-1; for (; $_TC>=0;$_TC--){ if($_Order['orderContent']['cart_content'][$_TC]['free_shipping'])continue; $Products[] = $_Order['orderContent']['cart_content'][$_TC]; } return $Products; } /* abstract methods */ /** * Return array of shipping types */ function _getShippingTypes(){ return array(); } /** * Return services for country * * @param integer $_CountryID - country id */ function _getServicesByCountry(){ return $this->getShippingServices(); } /** * Return list of shipping services * * @param string $_Type shipping type (Domestic, Inrenational) * @return array */ function getShippingServices(){return array();} function _prepareQuery(&$_Services, $order, $address){ return $this->_prepareXMLQuery($_Services, $order, $address); } function _sendQuery($_Query){ return $this->_sendXMLQuery($_Query); } function _parseAnswer($_Answer){ return $this->_parseXMLAnswer($_Answer); } function _sendXMLQuery(){ } function _prepareXMLQuery(){ } function _parseXMLAnswer(){;} } ?>ERROR: Couldn't find language file!