{"id":328858,"date":"2017-04-09T19:40:43","date_gmt":"2017-04-09T12:40:43","guid":{"rendered":"https:\/\/vietaircargo.com\/estimate-shipping-fees-ship-to-vietnam\/"},"modified":"2017-04-29T17:15:02","modified_gmt":"2017-04-30T00:15:02","slug":"quote_ship_to_vn","status":"publish","type":"page","link":"https:\/\/vietaircargo.com\/en\/quote_ship_to_vn\/","title":{"rendered":"Estimate Shipping Fees Ship to VietNam"},"content":{"rendered":"\n<style>\n    .phone_name_class_tabordermanager{\n        border-top-left-radius: 0px !important;\n        border-bottom-left-radius: 0px !important;\n    }\n<\/style>\n<div class=\"row\">\n    <form class=\"\" data-action=\"https:\/\/vietaircargo.com\/en\/\/wp-json\/custom\/1.0\/send-mail-ship-to-vn\" method=\"post\" id=\"form-add-order-shipping-to-vn\">\n        <div class=\"col-lg-12 col-md-12\">\n            <div class=\"panel panel-default\">\n                <div class=\"panel-heading\" role=\"tab\" id=\"headingOne\">\n                    <h4 class=\"panel-title \">\n                        <a class=\"no-decoration\" role=\"button\" data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#form-lien-he-dat-hang\" aria-expanded=\"true\" aria-controls=\"collapseOne\">\n                            <i class=\"fa fa-calculator\"><\/i> Estimate Shipping Fees & Delivery Time To Send Packages From the U.S. to VietNam                        <\/a>\n                    <\/h4>\n                <\/div>\n                <div id=\"form-lien-he-dat-hang\" class=\"panel-collapse collapse in\" role=\"tabpanel\" aria-labelledby=\"headingOne\">\n                    <div class=\"panel-body\">\n                        <div class=\"row\">\n                                                        <div class=\"col-lg-12 col-md-12\">\n                                <div class=\"alert alert-warning\" role=\"alert\">\n                                    With our <a href=\"https:\/\/vietaircargo.com\/en\/ship-from-the-us-to-vn\/\">Ship from the U.S. to Vietnam<\/a> service, customers from anywhere within the United States are able to send their cargo to and throughout Vietnam. The procedures are listed below: <br>\n                                    <ul>\n                                        <li>Sign in to <a href=\"https:\/\/vietaircargo.com\/en\/account\/\">Your Account<\/a>, send request for transportation for your cargo, and provide any necessary information.<\/li>\n                                        <li>If you request to receive a quote (not required), VietAir Cargo will inspect descriptions of each item and send you a general quote for the item you have chosen, including cost of the total invoice, to you within 1-6 hours.<\/li>\n                                        <li>Please use the provided inland label for each cargo box you are sending to Vietair Cargo office in San Jose, CA or send your cargo box by your own preference transportation and payment methods.<br>VietAir Cargo is the shipping center of FedEx and UPS, so we are able to provide you with label with shipping cost that are lower compared to other services or when you decided to send without using our system.<\/li>\n                                        <li>When packages have arrived at VietAir Cargo storage in San Jose, CA, you will receive a notification email and text message once your package(s) are inspected according to your provided information in your invoice.<br>Every item in your invoice and package will be inspected and their pictures will be included in the prospected invoice online.<\/li>\n                                        <li>VietAir Cargo will notify you when your invoice is ready for payment once the inspection processes are completed. Please sign into your account and complete the payment of pay later in Vietnam<\/li>\n                                        <li>VietAir Cargo then will transport your package(s) to Vietnam and deliver to the receiver home.<\/b><\/small><\/li>\n                                    <\/ul>\n                                    <em>For more specific, please check out <a href=\"https:\/\/vietaircargo.com\/en\/instructions-for-sending-packages-from-us-to-vn\/\">the instruction<\/a> and <a href=\"https:\/\/vietaircargo.com\/en\/price-list-for-shipping-from-the-us-to-vietnam\/\">price list<\/a><\/em>                                <\/div>\n\t\t\t\t\t\t\t<\/div>\n                            <div class=\"col-lg-12 col-md-12\">\n                                <div class=\"row\">\n                                    <div class=\"col-lg-4 col-md-4\">\n                                        <div class=\"form-group\">\n                                            <label class=\"control-label col-md-12 col-lg-12 text-left text-primary\">\n                                                1. Ship From (U.S.):\n                                            <\/label>\n                                        <\/div>\n                                        <div class=\"form-group\">\n                                            <label class=\"control-label col-md-4 col-lg-4 text-left\">\n                                                <i class=\"fa fa-star text-danger\"><\/i>ZIP code:\n                                            <\/label>\n                                            <div class=\"col-lg-6 col-md-6\">\n                                                <input name=\"sender_postal_code\" id=\"sender_postal_code_check\" class=\"form-control\" placeholder=\"V\u00ed d\u1ee5: 95111\">\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                    <div class=\"col-lg-4 col-md-4\">\n                                        <div class=\"form-group\">\n                                            <label class=\"control-label col-md-12 col-lg-12 text-left  text-primary\">\n                                                2. Ship To (VN):\n                                            <\/label>\n                                        <\/div>\n\n                                        <div class=\"form-group\">\n                                            <label class=\"control-label col-md-4 col-lg-4 text-left\">\n                                                <i class=\"fa fa-star text-danger\"><\/i>City:\n                                            <\/label>\n                                            <div class=\"col-lg-8 col-md-8\">\n                                                <td>\n                                                                                                        <select name=\"city_vn\" id=\"city_vn\" class=\"form-control\">\n                                                        <option value=\"0\" selected>VietNam City<\/option>\n                                                                                                                                                                                    <option value=\"169\" >Ngo\u1ea1i th\u00e0nh TP S\u00e0i G\u00f2n<\/option>\n                                                                                                                            <option value=\"98\" >N\u1ed9i th\u00e0nh TP S\u00e0i G\u00f2n<\/option>\n                                                                                                                            <option value=\"105\" >Th\u00e0nh ph\u1ed1 C\u1ea7n Th\u01a1<\/option>\n                                                                                                                            <option value=\"102\" >Th\u00e0nh ph\u1ed1 H\u00e0 N\u1ed9i<\/option>\n                                                                                                                            <option value=\"103\" >Th\u00e0nh ph\u1ed1 H\u1ea3i Ph\u00f2ng<\/option>\n                                                                                                                            <option value=\"104\" >Th\u00e0nh ph\u1ed1 \u0110\u00e0 N\u1eb5ng<\/option>\n                                                                                                                            <option value=\"106\" >T\u1ec9nh An Giang<\/option>\n                                                                                                                            <option value=\"107\" >T\u1ec9nh B\u00e0 R\u1ecba - V\u0169ng T\u00e0u<\/option>\n                                                                                                                            <option value=\"108\" >T\u1ec9nh B\u1eafc Giang<\/option>\n                                                                                                                            <option value=\"109\" >T\u1ec9nh B\u1eafc K\u1ea1n<\/option>\n                                                                                                                            <option value=\"110\" >T\u1ec9nh B\u1ea1c Li\u00eau<\/option>\n                                                                                                                            <option value=\"111\" >T\u1ec9nh B\u1eafc Ninh<\/option>\n                                                                                                                            <option value=\"112\" >T\u1ec9nh B\u1ebfn Tre<\/option>\n                                                                                                                            <option value=\"114\" >T\u1ec9nh B\u00ecnh D\u01b0\u01a1ng<\/option>\n                                                                                                                            <option value=\"115\" >T\u1ec9nh B\u00ecnh Ph\u01b0\u1edbc<\/option>\n                                                                                                                            <option value=\"116\" >T\u1ec9nh B\u00ecnh Thu\u1eadn<\/option>\n                                                                                                                            <option value=\"113\" >T\u1ec9nh B\u00ecnh \u0110\u1ecbnh<\/option>\n                                                                                                                            <option value=\"117\" >T\u1ec9nh C\u00e0 Mau<\/option>\n                                                                                                                            <option value=\"118\" >T\u1ec9nh Cao B\u1eb1ng<\/option>\n                                                                                                                            <option value=\"124\" >T\u1ec9nh Gia Lai<\/option>\n                                                                                                                            <option value=\"125\" >T\u1ec9nh H\u00e0 Giang<\/option>\n                                                                                                                            <option value=\"126\" >T\u1ec9nh H\u00e0 Nam<\/option>\n                                                                                                                            <option value=\"127\" >T\u1ec9nh H\u00e0 T\u0129nh<\/option>\n                                                                                                                            <option value=\"128\" >T\u1ec9nh H\u1ea3i D\u01b0\u01a1ng<\/option>\n                                                                                                                            <option value=\"129\" >T\u1ec9nh H\u1eadu Giang<\/option>\n                                                                                                                            <option value=\"130\" >T\u1ec9nh Ho\u00e0 B\u00ecnh<\/option>\n                                                                                                                            <option value=\"131\" >T\u1ec9nh H\u01b0ng Y\u00ean<\/option>\n                                                                                                                            <option value=\"132\" >T\u1ec9nh Kh\u00e1nh H\u00f2a<\/option>\n                                                                                                                            <option value=\"133\" >T\u1ec9nh Ki\u00ean Giang<\/option>\n                                                                                                                            <option value=\"134\" >T\u1ec9nh Kon Tum<\/option>\n                                                                                                                            <option value=\"135\" >T\u1ec9nh Lai Ch\u00e2u<\/option>\n                                                                                                                            <option value=\"136\" >T\u1ec9nh L\u00e2m \u0110\u1ed3ng<\/option>\n                                                                                                                            <option value=\"137\" >T\u1ec9nh L\u1ea1ng S\u01a1n<\/option>\n                                                                                                                            <option value=\"138\" >T\u1ec9nh L\u00e0o Cai<\/option>\n                                                                                                                            <option value=\"139\" >T\u1ec9nh Long An<\/option>\n                                                                                                                            <option value=\"140\" >T\u1ec9nh Nam \u0110\u1ecbnh<\/option>\n                                                                                                                            <option value=\"141\" >T\u1ec9nh Ngh\u1ec7 An<\/option>\n                                                                                                                            <option value=\"142\" >T\u1ec9nh Ninh B\u00ecnh<\/option>\n                                                                                                                            <option value=\"143\" >T\u1ec9nh Ninh Thu\u1eadn<\/option>\n                                                                                                                            <option value=\"144\" >T\u1ec9nh Ph\u00fa Th\u1ecd<\/option>\n                                                                                                                            <option value=\"145\" >T\u1ec9nh Ph\u00fa Y\u00ean<\/option>\n                                                                                                                            <option value=\"146\" >T\u1ec9nh Qu\u1ea3ng B\u00ecnh<\/option>\n                                                                                                                            <option value=\"147\" >T\u1ec9nh Qu\u1ea3ng Nam<\/option>\n                                                                                                                            <option value=\"148\" >T\u1ec9nh Qu\u1ea3ng Ng\u00e3i<\/option>\n                                                                                                                            <option value=\"149\" >T\u1ec9nh Qu\u1ea3ng Ninh<\/option>\n                                                                                                                            <option value=\"150\" >T\u1ec9nh Qu\u1ea3ng Tr\u1ecb<\/option>\n                                                                                                                            <option value=\"151\" >T\u1ec9nh S\u00f3c Tr\u0103ng<\/option>\n                                                                                                                            <option value=\"152\" >T\u1ec9nh S\u01a1n La<\/option>\n                                                                                                                            <option value=\"153\" >T\u1ec9nh T\u00e2y Ninh<\/option>\n                                                                                                                            <option value=\"154\" >T\u1ec9nh Th\u00e1i B\u00ecnh<\/option>\n                                                                                                                            <option value=\"155\" >T\u1ec9nh Th\u00e1i Nguy\u00ean<\/option>\n                                                                                                                            <option value=\"156\" >T\u1ec9nh Thanh H\u00f3a<\/option>\n                                                                                                                            <option value=\"157\" >T\u1ec9nh Th\u1eeba Thi\u00ean Hu\u1ebf<\/option>\n                                                                                                                            <option value=\"158\" >T\u1ec9nh Ti\u1ec1n Giang<\/option>\n                                                                                                                            <option value=\"159\" >T\u1ec9nh Tr\u00e0 Vinh<\/option>\n                                                                                                                            <option value=\"160\" >T\u1ec9nh Tuy\u00ean Quang<\/option>\n                                                                                                                            <option value=\"161\" >T\u1ec9nh V\u0129nh Long<\/option>\n                                                                                                                            <option value=\"162\" >T\u1ec9nh V\u0129nh Ph\u00fac<\/option>\n                                                                                                                            <option value=\"163\" >T\u1ec9nh Y\u00ean B\u00e1i<\/option>\n                                                                                                                            <option value=\"119\" >T\u1ec9nh \u0110\u1eafk L\u1eafk<\/option>\n                                                                                                                            <option value=\"120\" >T\u1ec9nh \u0110\u1eafk N\u00f4ng<\/option>\n                                                                                                                            <option value=\"121\" >T\u1ec9nh \u0110i\u1ec7n Bi\u00ean<\/option>\n                                                                                                                            <option value=\"122\" >T\u1ec9nh \u0110\u1ed3ng Nai<\/option>\n                                                                                                                            <option value=\"123\" >T\u1ec9nh \u0110\u1ed3ng Th\u00e1p<\/option>\n                                                                                                                                                                        <\/select>\n                                                    <input type=\"hidden\" name=\"city_vn_name\" id=\"city_vn_name\" value=\"\" \/>\n                                                <\/td>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                    <div class=\"col-lg-4 col-md-4\">\n                                        <div class=\"form-group\">\n                                            <label class=\"control-label col-md-12 col-lg-12 text-left text-primary\">\n                                                3. Ship date:\n                                            <\/label>\n                                        <\/div>\n\n                                        <div class=\"form-group\">\n                                            <label class=\"control-label col-md-4 col-lg-4 text-left\">\n                                                <i class=\"fa fa-star text-danger\"><\/i>Date:\n                                            <\/label>\n                                            <div class=\"input-group date col-lg-6 col-md-8\">\n                                                <input type=\"text\" class=\"input-sm form-control\" name=\"ship_date\" id=\"ship_date\"  value=\"\"><span class=\"input-group-addon\"><i class=\"fa fa-calendar\"><\/i><\/span>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                            <div class=\"col-lg-12 col-md-12\">\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12 col-md-12\">\n                                        <div class=\"form-group\">\n                                            <label class=\"control-label col-md-12 col-lg-12 text-left text-primary\">\n                                                4. Shipment information:\n                                            <\/label>\n                                        <\/div>\n                                        <div class=\"col-xs-12\">\n                                            <small>Please enter the package number and weight and size of each package (lbs-inch or kg \/ cm).<\/small>\n                                        <\/div>\n                                    <\/div>\n                                    <div class=\"col-lg-12 col-md-12\">\n                                        <div class=\"clearfix\"><\/div>\n                                        <div class=\"wrap-table\">\n                                                                                        <table class=\"table table-responsive\" width=\"100%\">\n                                                <tbody>\n                                                <tr>\n                                                    <td colspan=\"2\">\n                                                        - Restrict the transportation of boxes with sides longer than 22\".<br\/>- Please combine small boxes packed into medium box sized 18x18x16 inches with weight from 20-40lbs to have the most reasonable domestic rate. (For example, a 20lb box will cost less than two 10lb boxes.<br \/>- For boxes over 40lbs please pack carefully to avoid damage to the goods inside.                                                    <\/td>\n                                                <\/tr>\n                                                <tr class=\"form-add-product-ship-vn\">\n                                                    <td class=\"col-lg-6 col-md-6\">\n                                                        <div class=\"row\">\n                                                            <div class=\"col-lg-3 col-md-3\">\n                                                                <div class=\"form-group\">\n                                                                    <label class=\"control-label\">Number of boxes<\/label>\n                                                                    <select name=\"number_package\" id=\"number_package\" class=\"input-sm form-control\">\n                                                                        <option value=\"0\" selected><\/option>\n                                                                                                                                                    <option value=\"1\" >1<\/option>\n                                                                                                                                                    <option value=\"2\" >2<\/option>\n                                                                                                                                                    <option value=\"3\" >3<\/option>\n                                                                                                                                                    <option value=\"4\" >4<\/option>\n                                                                                                                                                    <option value=\"5\" >5<\/option>\n                                                                                                                                                    <option value=\"6\" >6<\/option>\n                                                                                                                                                    <option value=\"7\" >7<\/option>\n                                                                                                                                                    <option value=\"8\" >8<\/option>\n                                                                                                                                                    <option value=\"9\" >9<\/option>\n                                                                                                                                                    <option value=\"10\" >10<\/option>\n                                                                                                                                            <\/select>\n                                                                <\/div>\n                                                            <\/div>\n                                                            <div class=\"col-lg-9 col-md-9\" style=\"margin-top: 4px;\">\n                                                                <label class=\"control-label\"><\/label>\n                                                                <button type=\"button\" class=\"btn btn-sm btn-success btn-group-justified ladda-button\" data-style=\"zoom-in\" id=\"btn-estimated-cost\" >Estimate the cost & shipping time<\/button>\n                                                            <\/div>\n                                                        <\/div>\n                                                        <div class=\"row\">\n                                                            <div class=\"col-lg-12 col-md-12\" id=\"list_package\" style=\"display: none;\">\n                                                                <table class=\"table table-border table-striped\">\n                                                                    <tbody>\n                                                                                                                                        <\/tbody>\n                                                                <\/table>\n                                                            <\/div>\n                                                        <\/div>\n                                                    <\/td>\n                                                    <td class=\"col-lg-6 col-md-6\">\n                                                        <!--<label><\/label><br>-->\n                                                        <label class=\"cl_result_ship_fee\" >Select one of the options below<\/label>\n                                                        <div id=\"ship_fee_container\" class=\"cl_result_ship_fee form-group\" >\n                                                                                                                    <\/div>\n                                                        <button type=\"button\" class=\"btn btn-sm btn-info btn-group-justified\" id=\"btn-re-estimated-cost\" style=\"width: 185px; \">Nh\u1eadp & \u01af\u1edbc t\u00ednh l\u1ea1i chi ph\u00ed<\/button>\n                                                    <\/td>\n                                                <\/tr>\n                                                <\/tbody>\n                                            <\/table>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                            <div class=\"col-md-12 col-lg-12\">\n                                <div id=\"pn_cp_trongoi_thoigian\" style=\"display: none;\">\n                                    <hr \/>\n                                    <div class=\"row\">\n                                        <div class=\"col-lg-12 col-md-12\">\n                                            <label for=\"\" class=\"text-primary\">\n                                                Estimated total cost and transit time                                            <\/label>\n                                        <\/div>\n                                        <div class=\"col-lg-12 col-md-12\">\n                                            <strong style=\"font-size: 14px;\">Shipping Fee<\/strong>\n                                            <ul>\n                                                <li>Inland shipping charge: <span style=\"font-weight: bold;\" id=\"sp_phi_noidia\"><\/span><\/li>\n                                                <li>Transportation fee to Vietnam, home delivery fee: <span id=\"sp_phi_vn\"  style=\"font-weight: bold;\"><\/span> <span id=\"sp_phi_tinhthanh\"><em><\/em><\/span><\/li>\n                                                <li><strong>Total estimated shipping fee for invoice: <span id=\"sp_tongphi\"><\/span><\/strong><\/li>\n                                            <\/ul>\n                                            <strong style=\"font-size: 14px;\">Delivery time<\/strong>\n                                            <ul>\n                                                <li>Ship date: <span style=\"font-weight: bold;\" id=\"sp_tg_gui\"><\/span><\/li>\n                                                <li id=\"li_tg_vac_nhan\">VietAir Cargo will receive packages on: <span id=\"sp_tg_vac_nhan\" style=\"font-weight: bold;\"><\/span><\/li>\n                                                <li>After arrived in VietNam, packages will be delivered on: <span id=\"sp_tg_vn\" style=\"font-weight: bold;\"><\/span><\/li>\n                                            <\/ul>\n                                            <strong>Note:<\/strong> This is only an estimate invoice, not including import surcharges for the HQVN (if applicable). Please refer to the price list <a href=\"https:\/\/vietaircargo.com\/en\/price-list-for-shipping-from-the-us-to-vietnam\/\" target=\"_blank\">here<\/a><\/br>\n                                            <strong>In order to use  <a href=\"https:\/\/vietaircargo.com\/en\/ship-from-the-us-to-vn\/\" target=\"_blank\">Ship from the U.S. to VN<\/a> , please <a href=\"https:\/\/vietaircargo.com\/en\/register\/\" target=\"_blank\">sign up<\/a> for an account and use the feature Send packages to VN <\/strong>                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                            <div class=\"col-lg-6 col-md-6 col-md-offset-3 col-lg-offset-3\" id=\"dv-btn-continue-send-info\" style=\"display: none; margin-top: 20px;\">\n                                <div style=\"display: table; margin: auto;\">\n                                    <button class=\"btn btn-primary my-btn-sm btn-sm ladda-button\" data-style=\"expand-right\" type=\"button\" id=\"btn-send-info\" style=\"margin-right: 10px;\">Continue to send<\/button>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div class=\"clearfix\"><\/div>\n    <\/form>\n<\/div>\n<table id=\"tb_package_weight_dimension\" style=\"display: none;\">\n    <tbody>\n    <tr class=\"cl_number_package\">\n        <td class=\"cl_number_package_index\" align=\"center\" style=\"vertical-align: middle; font-weight: bold;\">Packages INDEX<\/td>\n        <td>\n            <div class=\"row\">\n                <div class=\"col-md-3\">\n                    <div class=\"form-group\">\n                        <label class=\"control-label\">C\u00e2n n\u1eb7ng<\/label>\n                        <input type=\"text\" class=\"input-sm form-control cl_weight_package is_html\" name=\"weight_package[]\" value=\"\" \/>\n                    <\/div>\n                <\/div>\n                <div class=\"col-md-3\">\n                    <label class=\"control-label\">&nbsp;<\/label>\n                    <select name=\"weight_package_unit[]\" class=\"form-control cl_weight_package_unit is_html\">\n                        <option value=\"lbs\" selected>lbs<\/option>\n                        <option value=\"kg\">kg<\/option>\n                    <\/select>\n                <\/div>\n            <\/div>\n            <div class=\"row\">\n                <div class=\"col-md-3\">\n                    <div class=\"form-group\">\n                        <label class=\"control-label\">Width<\/label>\n                        <input type=\"text\" class=\"input-sm form-control cl_width_package is_html\" name=\"width_package[]\" value=\"\" \/>\n                    <\/div>\n                <\/div>\n                <div class=\"col-md-3\">\n                    <div class=\"form-group\">\n                        <label class=\"control-label\">Height<\/label>\n                        <input type=\"text\" class=\"input-sm form-control cl_height_package is_html\" name=\"height_package[]\" value=\"\" \/>\n                    <\/div>\n                <\/div>\n                <div class=\"col-md-3\">\n                    <div class=\"form-group\">\n                        <label class=\"control-label\">Length<\/label>\n                        <input type=\"text\" class=\"input-sm form-control cl_depth_package is_html\" name=\"depth_package[]\" value=\"\" \/>\n                    <\/div>\n                <\/div>\n                <div class=\"col-md-3\">\n                    <div class=\"form-group\">\n                        <label class=\"control-label\">&nbsp;<\/label>\n                        <select name=\"dimension_package_unit[]\" class=\"form-control cl_dimension_package_unit is_html\">\n                            <option value=\"inch\" selected>inch<\/option>\n                            <option value=\"cm\">cm<\/option>\n                        <\/select>\n                    <\/div>\n                <\/div>\n            <\/div>\n            <div class=\"row cl_warning_package\" style=\"display: none;\">\n                <div class=\"col-md-12\">\n                    <span class=\"text-danger\"><\/span>\n                <\/div>\n            <\/div>\n        <\/td>\n    <\/tr>\n    <\/tbody>\n<\/table>\n\n<div class=\"modal\" id=\"continue_send_info_modals\">\n    <div class=\"modal-dialog modal-lg\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">\u00d7<\/button>\n                <h4 class=\"modal-title\">Continue to send<\/h4>\n            <\/div>\n            <div class=\"modal-body\">\n                <form id=\"form-submit-send-info\">\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6\">\n                            <div class=\"form-horizontal\">\n                                <div class=\"form-group\">\n                                    <label class=\"control-label col-md-12 col-lg-12 text-left text-primary\">\n                                        1. Sender information:\n                                    <\/label>\n                                <\/div>\n                                <hr>\n                                <div class=\"form-group\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><i class=\"fa fa-star text-danger\"><\/i>E-mail:<\/label>\n                                    <div class=\"col-sm-8\">\n                                        <input type=\"text\" class=\"form-control\" name=\"sender_email\" required id=\"sender_email\" placeholder=\"Enter e-mail address\" value=\"\">\n                                    <\/div>\n                                <\/div>\n                                <div class=\"form-group\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><i class=\"fa fa-star text-danger\"><\/i> First and last name:<\/label>\n                                    <div class=\"col-sm-8\">\n                                        <input type=\"text\" class=\"form-control\" name=\"sender_name\" required id=\"sender_name\" placeholder=\"Enter first and last name\" value=\"\">\n                                    <\/div>\n                                <\/div>\n                                <div class=\"form-group\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><i class=\"fa fa-star text-danger\"><\/i> Phone number:<\/label>\n                                    <div class=\"col-sm-8\">\n                                        <input type=\"text\" class=\"form-control\" name=\"sender_phone\" required id=\"sender_phone\" placeholder=\"Enter phone number\" value=\"\">\n                                    <\/div>\n                                <\/div>\n                                <div class=\"form-group\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><i class=\"fa fa-star text-danger\"><\/i> Zip code: <\/label>\n                                    <div class=\"col-md-8\">\n                                        <input type=\"text\" name=\"sender_postal_code\" id=\"sender_postal_code\" value=\"\" class=\"form-control form-control-2\" placeholder=\"\">\n                                    <\/div>\n                                <\/div><!-- .form-group -->\n                                <div class=\"form-group dv_state_city_loading\" style=\"display: none;\">\n                                    <div class=\"col-md-8 col-sm-offset-4\"><span>Getting information...<\/span><\/div>\n                                <\/div>\n                                <div class=\"form-group dv_state_city\" style=\"display: none;\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\">State: <\/label>\n                                    <div class=\"col-md-8\">\n                                        <input type=\"text\" name=\"sender_state\" id=\"sender_state\" value=\"\" class=\"form-control form-control-2\" placeholder=\"\" readonly>\n                                    <\/div>\n                                <\/div><!-- .form-group -->\n                                <div class=\"form-group dv_state_city\" style=\"display: none;\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><i class=\"fa fa-star text-danger\"><\/i> City: <\/label>\n                                    <div class=\"col-md-8\">\n                                        <select name=\"sender_state_city\" id=\"sender_state_city\" class=\"form-control\"><\/select>\n                                    <\/div>\n                                <\/div><!-- .form-group -->\n                                <div class=\"form-group\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><i class=\"fa fa-star text-danger\"><\/i> Address:: <\/label>\n                                    <div class=\"col-md-8\">\n                                        <input type=\"text\" name=\"sender_address\" id=\"sender_address\" class=\"form-control form-control-2\" placeholder=\"Please enter specific home address\" value=\"\">\n                                    <\/div>\n                                <\/div><!-- .form-group -->\n                            <\/div>\n                        <\/div>\n                        <div class=\"col-lg-6 col-md-6\">\n                            <div class=\"form-horizontal\">\n                                <input type=\"hidden\" name=\"city_vn\" id=\"city_vn\" value=\"\" \/>\n                                <input type=\"hidden\" name=\"city_vn_name\" id=\"city_vn_name\" value=\"\" \/>\n                                <div class=\"form-group\">\n                                    <label class=\"control-label col-md-12 col-lg-12 text-left  text-primary\">\n                                        2. Receiver Information:\n                                    <\/label>\n                                <\/div>\n                                <hr>\n                                <div class=\"form-group\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><i class=\"fa fa-star text-danger\"><\/i> First and last name:<\/label>\n                                    <div class=\"col-sm-8\">\n                                        <input type=\"text\" class=\"form-control\" name=\"name\" required id=\"ship_vn_name\" placeholder=\"Enter first and last name\" value=\"\">\n                                    <\/div>\n                                <\/div>\n                                <div class=\"form-group\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><i class=\"fa fa-star text-danger\"><\/i> Phone number:<\/label>\n                                    <div class=\"col-sm-8\">\n                                        <div class=\"input-group\" id=\"div_phone_user_tabordermanager\" style=\"width: 100%;\">\n                                            <input type=\"text\" class=\"form-control\" name=\"phone\" required id=\"ship_vn_phone\" placeholder=\"Enter phone number\" value=\"\">\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                                <div class=\"form-group\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><i class=\"fa fa-star text-danger\"><\/i>Email:<\/label>\n                                    <div class=\"col-sm-8\">\n                                        <input type=\"text\" class=\"form-control\" name=\"email\" required id=\"ship_vn_email\" placeholder=\"Enter e-mail address\" value=\"\">\n                                    <\/div>\n                                <\/div>\n                                <div class=\"form-group\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><\/label>\n                                    <div class=\"checkbox col-sm-8\">\n                                        <label><input type=\"checkbox\" name=\"is_receiver_vac_vn\" id=\"is_receiver_vac_vn\" value=\"1\" style=\"-webkit-appearance: checkbox; -moz-appearance: checkbox; -ms-appearance: checkbox; -o-appearance: checkbox;\"\/>&nbsp;Pick up at VietAir Cargo VN Office<\/label>\n                                    <\/div>\n                                <\/div>\n                                <div class=\"form-group\" style=\"display: none;\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><i class=\"fa fa-star text-danger\"><\/i> Country:<\/label>\n                                    <div class=\"col-sm-8\">\n                                        <select class=\"form-control\" name=\"country\" id=\"ship_vn_country\" required=\"\" aria-required=\"true\">\n                                            <option value=\"Vi\u1ec7t Nam\" selected>Vi\u1ec7t Nam<\/option>\n                                        <\/select>\n                                    <\/div>\n                                <\/div><!-- .form-group -->\n\n                                <div class=\"form-group hidden-us hide_is_receiver_vac_vn\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><i class=\"fa fa-star text-danger\"><\/i> Province:<\/label>\n                                    <div class=\"col-sm-8\">\n                                        <select class=\"form-control\" name=\"receiverCity\" id=\"ship_vn_receiverCity\">\n                                            <option value=\"\" selected> Choose city\/province<\/option>\n                                        <\/select>\n                                    <\/div>\n                                <\/div><!-- .form-group -->\n\n                                <div class=\"form-group hidden-us hide_is_receiver_vac_vn\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><i class=\"fa fa-star text-danger\"><\/i> District:<\/label>\n                                    <div class=\"col-sm-8\">\n                                        <select class=\"form-control\" name=\"receiverDistrict\" id=\"ship_vn_receiverDistrict\">\n                                            <option value=\"\" selected>Choose a district<\/option>\n                                        <\/select>\n                                    <\/div>\n                                <\/div><!-- .form-group -->\n\n                                <div class=\"form-group hidden-us hide_is_receiver_vac_vn\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\">Ward:<\/label>\n                                    <div class=\"col-sm-8\">\n                                        <input type=\"text\" name=\"receiverWard\" class=\"form-control\" placeholder=\"Please enter ward\" value=\"\">\n                                    <\/div>\n                                <\/div><!-- .form-group -->\n\n                                <div class=\"form-group hide_is_receiver_vac_vn\">\n                                    <label for=\"\" class=\"col-sm-4 control-label\"><i class=\"fa fa-star text-danger\"><\/i> Address::<\/label>\n                                    <div class=\"col-sm-8\">\n                                        <input type=\"text\" name=\"address_reg_vn\" id=\"ship_vn_address_reg_vn\" class=\"form-control form-control-2\" placeholder=\"(House number and address) 602\/45d \u0110i\u1ec7n Bi\u00ean Ph\u1ee7\">\n                                    <\/div>\n                                <\/div><!-- .form-group -->\n                            <\/div>\n                        <\/div>\n                        <div class=\"col-lg-12 col-md-12\">\n                            <label for=\"\" class=\"text-primary\">\n                                3. Payment method                            <\/label>\n                            <div class=\"row\">\n                                <div class=\"col-md-6\">\n                                    <div class=\"radio\">\n                                        <label><input type=\"radio\" name=\"loai_thanhtoan\" id=\"vac_us\" value=\"2\" \/>&nbsp;Payment at US<\/label><br \/><em>(Online Payment Support All Credit Cards, PayPal, or Bank Transfer)<\/em>\n                                    <\/div>\n                                <\/div>\n                                <div class=\"col-md-6\">\n                                    <div class=\"radio\">\n                                        <label><input type=\"radio\" name=\"loai_thanhtoan\" id=\"vac_vn\" value=\"1\" \/>&nbsp;Payment at VN<\/label><br \/><em>(Online Payment Support All Credit Cards, PayPal, Bao Kim, Ngan Luong, Vietnam Bank Transfer, or Cash on Delivery in Sai Gon City)<\/em>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                        <div class=\"col-lg-12 col-md-12\">\n                            <div>\n                                <div class=\"pull-left\">\n                                    <label for=\"\" class=\"text-primary\">\n                                        4. Package Contents                                    <\/label>\n                                <\/div>\n                                <div class=\"clearfix\"><\/div>\n                            <\/div>\n                            <div id=\"good_in_package\">\n                                <table class=\"table table-border table-striped\">\n                                    <colgroup>\n                                        <col width=\"5%\">\n                                        <col width=\"5%\">\n                                        <col width=\"40%\">\n                                        <col width=\"10%\">\n                                        <col width=\"20%\">\n                                    <\/colgroup>\n                                    <thead>\n                                    <th>&nbsp;<\/th>\n                                    <th class=\"text-center\">Item<\/th>\n                                    <th><i class=\"fa fa-star text-danger\"><\/i>Goods name<\/th>\n                                    <th><i class=\"fa fa-star text-danger\"><\/i>Quantity<\/th>\n                                    <th><i class=\"fa fa-star text-danger\"><\/i>Value<\/th>\n                                    <\/thead>\n                                    <tbody>\n                                                                            <tr class=\"good_item\">\n                                            <td align=\"center\" style=\"vertical-align: middle\">\n                                                                                            <\/td>\n                                            <td class=\"cl_good_stt\" align=\"center\" style=\"vertical-align: middle\">1<\/td>\n                                            <td><input type=\"text\" name=\"good_name[]\" value=\"\" class=\"form-control cl_good_name\" placeholder=\"\" \/><\/td>\n                                            <td><input type=\"number\" min=\"1\" name=\"good_quantity[]\" value=\"\" class=\"form-control cl_good_quantity\" placeholder=\"\" \/><\/td>\n                                            <td><input type=\"number\" name=\"good_price[]\" value=\"\" class=\"form-control cl_good_price\" placeholder=\"\" \/><\/td>\n                                        <\/tr>\n                                                                            <tr class=\"good_item\">\n                                            <td align=\"center\" style=\"vertical-align: middle\">\n                                                                                                    <a href=\"javascript: void(0);\" onclick=\"removeGoodInPackage(this)\"><i class=\"fa fa-remove\"><\/i><\/a>\n                                                                                            <\/td>\n                                            <td class=\"cl_good_stt\" align=\"center\" style=\"vertical-align: middle\">2<\/td>\n                                            <td><input type=\"text\" name=\"good_name[]\" value=\"\" class=\"form-control cl_good_name\" placeholder=\"\" \/><\/td>\n                                            <td><input type=\"number\" min=\"1\" name=\"good_quantity[]\" value=\"\" class=\"form-control cl_good_quantity\" placeholder=\"\" \/><\/td>\n                                            <td><input type=\"number\" name=\"good_price[]\" value=\"\" class=\"form-control cl_good_price\" placeholder=\"\" \/><\/td>\n                                        <\/tr>\n                                                                            <tr class=\"good_item\">\n                                            <td align=\"center\" style=\"vertical-align: middle\">\n                                                                                                    <a href=\"javascript: void(0);\" onclick=\"removeGoodInPackage(this)\"><i class=\"fa fa-remove\"><\/i><\/a>\n                                                                                            <\/td>\n                                            <td class=\"cl_good_stt\" align=\"center\" style=\"vertical-align: middle\">3<\/td>\n                                            <td><input type=\"text\" name=\"good_name[]\" value=\"\" class=\"form-control cl_good_name\" placeholder=\"\" \/><\/td>\n                                            <td><input type=\"number\" min=\"1\" name=\"good_quantity[]\" value=\"\" class=\"form-control cl_good_quantity\" placeholder=\"\" \/><\/td>\n                                            <td><input type=\"number\" name=\"good_price[]\" value=\"\" class=\"form-control cl_good_price\" placeholder=\"\" \/><\/td>\n                                        <\/tr>\n                                                                            <tr class=\"good_item\">\n                                            <td align=\"center\" style=\"vertical-align: middle\">\n                                                                                                    <a href=\"javascript: void(0);\" onclick=\"removeGoodInPackage(this)\"><i class=\"fa fa-remove\"><\/i><\/a>\n                                                                                            <\/td>\n                                            <td class=\"cl_good_stt\" align=\"center\" style=\"vertical-align: middle\">4<\/td>\n                                            <td><input type=\"text\" name=\"good_name[]\" value=\"\" class=\"form-control cl_good_name\" placeholder=\"\" \/><\/td>\n                                            <td><input type=\"number\" min=\"1\" name=\"good_quantity[]\" value=\"\" class=\"form-control cl_good_quantity\" placeholder=\"\" \/><\/td>\n                                            <td><input type=\"number\" name=\"good_price[]\" value=\"\" class=\"form-control cl_good_price\" placeholder=\"\" \/><\/td>\n                                        <\/tr>\n                                                                        <\/tbody>\n                                <\/table>\n                                <div style=\"margin-top: 10px;\">\n                                    <button type=\"button\" class=\"btn btn-default my-btn-sm btn-sm\" id=\"btn-add-more-good\"><i class=\"fa fa-plus\"><\/i>&nbsp;Add more items<\/button>\n                                <\/div>\n                            <\/div>\n                            <hr \/>\n                            <div>\n                                <div>\n                                    <label for=\"\" class=\"text-primary\">\n                                        Goods photos (optional)                                    <\/label>\n                                <\/div>\n                                <div class=\"row\">\n                                    <div class=\"col-md-12\">\n                                        <span style=\"color: red;\">*<\/span>To receive a more accurate quotation for your request to ship from the US to Vietnam, you can provide the good images here. You can take multiple images at the same time for your package or take the whole picture. Providing visual images is not mandatory but will be effective in providing accurate quotes to customers                                    <\/div>\n                                    <div class=\"col-md-12 upload_photo_large\">\n                                        <div id=\"upload_photo_box\" class=\"dropzone\"><\/div>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                            <hr \/>\n                            <div>\n                                <div>\n                                    <label for=\"\" class=\"text-primary\">\n                                        Coupon \/ Gift card\n                                    <\/label>\n                                <\/div>\n                                <div class=\"row\">\n                                    <div class=\"col-md-5\">\n                                        <div class=\"input-group\">\n                                            <input type=\"text\" class=\"input-sm form-control cl_coupon_code\" name=\"coupon_code\"\n                                                   value=\"\"\n                                                   placeholder=\"Please enter coupon\/gift card number\" style=\"text-transform: uppercase;\">\n                                            <div class=\"input-group-btn\">\n                                                <button class=\"btn btn-default btn-sm my-btn-sm ladda-button\" data-style=\"expand-right\" data-spinner-color=\"#000000\"\n                                                        type=\"button\" onclick=\"applyCoupon(this,'ship_vn',);\"><i\n                                                            class=\"fa fa-check\"><\/i>&nbsp;Apply                                                <\/button>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                    <div style=\"clear: both;\"><\/div>\n                                    <div class=\"col-md-8 dv_ls_coupon\" style=\"margin-top: 10px;display: none;\" id=\"dv_ls_coupon_ship_vn\">\n                                        <table class=\"table table-bordered table-striped\">\n                                            <tbody><\/tbody>\n                                        <\/table\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                            <hr \/>\n                            <div>\n                                <div>\n                                    <label for=\"\" class=\"text-primary\">\n                                        Notes to the recipient                                    <\/label>\n                                <\/div>\n                                <div class=\"row\">\n                                    <div class=\"col-md-12\">\n                                        <span style=\"color: red;\">*<\/span>Notes for VietAir Cargo (if you have information that VietAir Cargo needs to know when processing this order)                                    <\/div>\n                                    <div class=\"col-md-12\">\n                                        <textarea class=\"form-control\" style=\"height: 20px;\" name=\"order_note\"><\/textarea>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                            <hr \/>\n                            <div>\n                                <div>\n                                    <label for=\"\" class=\"text-primary\">\n                                        Notes for VietAir Cargo (if you have information that VietAir Cargo needs to know when processing this order)                                    <\/label>\n                                <\/div>\n                                <div class=\"row\">\n                                    <div class=\"col-md-12\">\n                                        <span style=\"color: red;\">*<\/span>Notes for VietAir Cargo (if you have information that VietAir Cargo needs to know when processing this order)                                    <\/div>\n                                    <div class=\"col-md-12\">\n                                        <textarea class=\"form-control\" style=\"height: 20px;\" name=\"order_note_from_sender\"><\/textarea>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                            <hr \/>\n                            <div>\n                                    <span class=\"gTFeeShip text-intro-none\" style=\"display: none\">\n                                        <p>Please send your package to the warehouse of VietAir Cargo at the following address:<\/p>\n                                        <p><b>VietAir Cargo<\/b> <br>\n                                            1208 Story Rd - San Jose CA 95122 <br>\n                                            (408) 898 9999<\/p>\n                                        <p>Please attach a signature required on delivery and track the package with tracking number. Please carefully pack your shipment to avoid any damages. VietAir Cargo will notify you and provide invoice upon receipt of the package.<\/p> Refer to <a href=\"https:\/\/vietaircargo.com\/en\/news-and-info\/general-guide-on-packing-goods-at-vietair-cargo\/\" target=\"_blank\">our packing guide<\/a>.                                    <\/span>\n\n                                <span class=\"gTFeeShip text-intro-fedex\" style=\"display: none\">\n                                        <p>VietAir Cargo will supply the label to you based on the package information provided above after you have processed your order. Label will be accompanied by order information at  <a href=\"\" class=\"alert-link active-tab2\">Order Management.<\/a>. Please print, label, package, carefully pack, avoid damage and drop off at any FedEx shipping office. VietAir Cargo will notify you and provide invoice upon receipt of the package.<\/p>\n                                        <p>\n                                            Refer to <a href=\"https:\/\/vietaircargo.com\/en\/news-and-info\/general-guide-on-packing-goods-at-vietair-cargo\/\" target=\"_blank\">our packing guide<\/a>. You can find the nearest FedEx location <a href=\"https:\/\/www.fedex.com\/locate\/\">here<\/a>\n                                        <\/p>                                    <\/span>\n\n                                <span class=\"gTFeeShip text-intro-usps\" style=\"display: none\">\n                                        <p>VietAir Cargo will supply the label to you based on the package information provided above after you have processed your order. Label will be accompanied by order information at  <a href=\"\" class=\"alert-link active-tab2\">Order Management.<\/a>. Please print, label, package, carefully pack, avoid damage and drop off at any USPS shipping office. VietAir Cargo will notify you and provide invoice upon receipt of the package.<\/p>\n                                        <p>\n                                            Refer to <a href=\"https:\/\/vietaircargo.com\/en\/news-and-info\/general-guide-on-packing-goods-at-vietair-cargo\/\" target=\"_blank\">our packing guide<\/a>. You can find the nearest USPS location <a href=\"https:\/\/www.usps.com\/locator\">here<\/a>\n                                        <\/p>                                    <\/span>\n\n                                <span class=\"gTFeeShip text-intro-ups\" style=\"display: none\">\n                                        <p>VietAir Cargo will supply the label to you based on the package information provided above after you have processed your order. Label will be accompanied by order information at  <a href=\"\" class=\"alert-link active-tab2\">Order Management.<\/a>. Please print, label, package, carefully pack, avoid damage and drop off at any UPS shipping office. VietAir Cargo will notify you and provide invoice upon receipt of the package.<\/p>\n                                        <p>\n                                            Refer to <a href=\"https:\/\/vietaircargo.com\/en\/news-and-info\/general-guide-on-packing-goods-at-vietair-cargo\/\" target=\"_blank\">our packing guide<\/a>. You can find the nearest UPS location <a href=\"https:\/\/www.ups.com\/dropoff\">here<\/a>\n                                        <\/p>                                    <\/span>\n                            <\/div>\n                        <\/div>\n                    <\/div>\n                    <input type=\"hidden\" name=\"html_service_choice\" id=\"html_service_choice\" value=\"\" \/>\n                    <input type=\"hidden\" name=\"ship_service_option\" id=\"ship_service_option\" value='' \/>\n                <\/form>\n            <\/div>\n            <div class=\"modal-footer\">\n                <button class=\"btn btn-primary my-btn-sm btn-sm ladda-button\" data-style=\"expand-right\" type=\"button\" id=\"btn-submit-send-info\">Send information<\/button>\n            <\/div>\n        <\/div>\n        <!-- \/.modal-content -->\n    <\/div>\n    <!-- \/.modal-dalog -->\n<\/div>\n<script>\n    $ = jQuery;\n\n\n    function removeCoupon(coupon_code,_this,order_id){\n        if(typeof(order_id) == 'undefined') order_id = 0;\n        if(coupon_code != ''){\n            var _tr_container = $(_this).parents('.tr_coupon');\n            if(_tr_container.length == 0){\n                swal(\"\",'This coupon\/gift card can\\'t be used on this invoice',\"error\");\n                return false;\n            }\n            swal({\n                    title: \"Confirm\",\n                    text: \"Are you really want to remove this coupon\/gift card?\",\n                    type: \"warning\",\n                    showCancelButton: true,\n                    confirmButtonColor: \"#DD6B55\",\n                    confirmButtonText: \"Agree\",\n                    cancelButtonText: \"Cancel\",\n                    closeOnConfirm: true,\n                    closeOnCancel: true\n                },\n                function(isConfirm){\n                    if (isConfirm) {\n                        if(order_id > 0){\n                            var l_btn = Ladda.create(_this);\n                            $.ajax({\n                                url: \"https:\/\/vietaircargo.com\/en\/\/wp-json\/custom\/1.0\/remove-coupon\",\n                                dataType: \"json\",\n                                data: {action: \"remove_coupon\", id: order_id, coupon_code: coupon_code},\n                                type: \"post\",\n                                beforeSend: function(){\n                                    l_btn.start();\n                                    $(\"button\").attr(\"disabled\",\"disabled\");\n                                },\n                                success: function(res) {\n                                    l_btn.stop();\n                                    $(\"button\").removeAttr(\"disabled\");\n                                    if (res.status == 200) {\n                                        _tr_container.remove();\n                                    } else if (res.status==400){\n                                        swal(\"\",res.message,\"error\");\n                                    }\n                                }\n                            })\n                        }\n                        else if(_tr_container.length > 0){\n                            _tr_container.remove();\n                        }\n                    }\n                });\n        }\n    }\n    function applyCoupon(_this,tab_name,order_id){\n        if(typeof(tab_name) == 'undefined') tab_name = '';\n        if(typeof(order_id) == 'undefined') order_id = 0;\n        var _parent_input = $(_this).parents(\".input-group\");\n        var _coupon_input = $(\".cl_coupon_code\",_parent_input);\n        var coupon_code =  _coupon_input.val();\n        _coupon_input.closest('.input-group').removeClass('has-error');\n        if(coupon_code == ''){\n            _coupon_input.closest('.input-group').addClass('has-error');\n            _coupon_input.focus();\n            return false;\n        }\n        var is_coupon = 0;\n        coupon_code = coupon_code.trim();\n        var coupon_code_lower = coupon_code.toLowerCase();\n        if($(\"#tr_coupon_\" + tab_name +\"_\" + coupon_code_lower).length > 0){\n            is_coupon = $(\"#tr_coupon_\" + tab_name +\"_\" + coupon_code_lower).data(\"coupon\");\n            if(is_coupon == 0){\n                swal(\"\",'This coupon\/gift card has been used',\"error\");\n                _coupon_input.closest('.input-group').addClass('has-error');\n                _coupon_input.focus();\n                return false;\n            }\n        }\n        var l_btn = Ladda.create(_this);\n        $.ajax({\n            url: \"https:\/\/vietaircargo.com\/en\/\/wp-json\/custom\/1.0\/apply-coupon\",\n            dataType: \"json\",\n            data: {coupon_code: coupon_code, id: order_id},\n            type: \"post\",\n            beforeSend: function(){\n                l_btn.start();\n                $(\"button\").attr(\"disabled\",\"disabled\");\n            },\n            success: function(res) {\n                l_btn.stop();\n                $(\"button\").removeAttr(\"disabled\");\n                if (res.status == 200) {\n                    var _result = res.result;\n                    if(typeof(_result) != 'undefined'){\n                        _coupon_input.val(\"\");\n                        var value_type = 'Coupon';\n                        is_coupon = 1;\n                        if(_result.gift_card == 1){\n                            value_type = 'Gift card';\n                            is_coupon = 0;\n                        }\n                        var coupon_code_lower = _result.code.toLowerCase();\n                        var _html = '<tr class=\"tr_coupon tr_coupon_'+tab_name+'\" id=\"tr_coupon_'+tab_name+'_'+coupon_code_lower+'\" data-coupon=\"'+is_coupon+'\">' +\n                            '<td>'+value_type+': '+_result.code+'<\/td>' +\n                            '<td>'+_result.use_for+'<\/td>' +\n                            '<td>'+_result.value+'<\/td>' +\n                            '<td width=\"1%\">' +\n                            '<button class=\"btn btn-link btn-sm my-btn-sm ladda-button\" data-style=\"zoom-in\" type=\"button\" onclick=\"removeCoupon(\\''+_result.code+'\\',this);\"><i class=\"fa fa-remove\"><\/i><\/button>' +\n                            '<input type=\"hidden\" name=\"coupon_code[]\" value=\"'+_result.code+'\" \/>' +\n                            '<\/td>' +\n                            '<\/tr>';\n                        if(is_coupon == 1){\n                            $(\".tr_coupon_\"+tab_name).each(function(){\n                                if($(this).data(\"coupon\") == 1){\n                                    $(this).remove();\n                                }\n                            });\n                            $(\"#dv_ls_coupon_\"+tab_name+\" table.table tbody\").prepend(_html);\n                        } else {\n                            $(\"#dv_ls_coupon_\"+tab_name+\" table.table tbody\").append(_html);\n                        }\n                        if(tab_name != ''){\n                            $(\"#dv_ls_coupon_\"+tab_name).show();\n                        }\n                    }\n\n                } else if (res.status==400){\n                    swal(\"\",res.message,\"error\");\n                }\n            }\n        })\n    }\n\n    var countryVI = {};\n    var countryUS = {};\n    var ship_fee_noidia = new Array();\n    var zip_code_array = new Array();\n    var timeout_get_state_city;\n    var city_selected = '';\n    var district_selected = '';\n    var country_selected = '';\n\n    var upload_photo_array = [];\n    var order_photo_gallery = [];\n    var timeout_email_get_info;\n    var warning_weight_dimension = '<strong>NOTE:<\/strong> The size of the package is greater than the weight, so it will be calculated according to the weight dimensions [weight_dimensions]';\n    function checkDataSender(){\n        var sender_postal_code = $('#sender_postal_code_check').val();\n        if(sender_postal_code == ''){\n            $('#sender_postal_code_check').focus();\n            swal(\"\",\"Pleae enter postal code\",\"error\");\n            return false;\n        }\n        return true;\n    }\n    function checkDataSenderInModal(){\n        var buyer_shipping_name = $('#sender_name').val();\n        var buyer_shipping_phone = $('#sender_phone').val();\n        var buyer_shipping_postal_code = $('#sender_postal_code').val();\n        var buyer_shipping_state_code = $('#sender_state').val();\n        var buyer_shipping_city_name = $('#sender_state_city').val();\n\n        if(buyer_shipping_name == '' || buyer_shipping_phone == ''){\n            $(\"#sender_name\").focus();\n            swal(\"\",\"Please select the shipper information\",\"error\");\n            return false;\n        }\n        if(buyer_shipping_postal_code == ''){\n            swal(\"\",\"Please select zip code information\",\"error\");\n            return false;\n        }\n\n        return true;\n    }\n    function checkDataReceiverInModal(){\n        if($(\"#ship_vn_country\").length > 0){\n            var receiverName = $(\"#ship_vn_name\").val();\n            var receiverPhone = $(\"#ship_vn_phone\").val();\n            var receiverCity = $(\"#ship_vn_receiverCity\").val();\n            var receiverDistrict = $(\"#ship_vn_receiverDistrict\").val();\n            var address_reg_vn = $(\"#ship_vn_address_reg_vn\").val();\n            if(receiverName == ''){\n                jQuery(\"#ship_vn_name\").focus();\n                swal('',\"Please enter the recipient's full name\",'error');\n                return false;\n            }\n            if(receiverPhone == ''){\n                jQuery(\"#ship_vn_phone\").focus();\n                swal('',\"Please enter the recipient's phone number\",'error');\n                return false;\n            }\n            if($(\"#is_receiver_vac_vn\").is(\":checked\") == false){\n                if(receiverCity == ''){\n                    jQuery(\"#ship_vn_receiverCity\").focus();\n                    swal('','Please choose city\/province','error');\n                    return false;\n                }\n                if(receiverDistrict == ''){\n                    jQuery(\"#ship_vn_receiverDistrict\").focus();\n                    swal('','Please choose a district','error');\n                    return false;\n                }\n                if(address_reg_vn == ''){\n                    jQuery(\"#ship_vn_address_reg_vn\").focus();\n                    swal('','Vui l\u00f2ng nh\u1eadp \u0111\u1ecba ch\u1ec9','error');\n                    return false;\n                }\n            }\n        } else if($(\"#is_receiver_vac_vn\").is(\":checked\") == true){\n            var receiverName = $(\"#receiver_name\").val();\n            var receiverPhone = $(\"#receiver_phone\").val();\n            if(receiverName == ''){\n                jQuery(\"#receiver_name\").focus();\n                swal('',\"Please enter the recipient's full name\",'error');\n                return false;\n            }\n            if(receiverPhone == ''){\n                jQuery(\"#receiver_phone\").focus();\n                swal('',\"Please enter the recipient's phone number\",'error');\n                return false;\n            }\n        } else{\n            var receiver_shipping_name = $('#receiver_name').val();\n            var receiver_shipping_phone = $('#receiver_phone').val();\n\n            var buyer_shipping_id = $(\"#buyer_shipping_id\").val();\n            var receiver_shipping = $(\"#receiver_shipping_id\").val();\n\n            var city_name = $('#receiver_city_name').val();\n            var district_name = $('#receiver_district_name').val();\n\n            if(receiver_shipping_name == '' || receiver_shipping_phone == ''){\n                $(\"#receiver_shipping_stvn\").focus();\n                swal(\"\",\"Please select the recipient information\",\"error\");\n                return false;\n            }\n        }\n\n        return true;\n    }\n    function checkInputPackage(){\n        var valid = true;\n\n        var city_vn = $('#city_vn').val();\n        if(city_vn == 0){\n            $('#city_vn').focus();\n            swal(\"\",\"Please choose city from the list\",\"error\");\n            return false;\n        }\n\n        var ship_date = $('#ship_date').val();\n        if(ship_date == ''){\n            $('#ship_date').focus();\n            swal(\"\",\"Please select a ship date\",\"error\");\n            return false;\n        }\n\n        var number_package = $('#number_package').val();\n        if(number_package == 0){\n            $('#number_package').focus();\n            swal(\"\",\"Please enter the number of packages\",\"error\");\n            return false;\n        }\n\n        var index_weight_error = \"\";\n        \/\/ ki\u1ec3m tra nh\u1eadp c\u00e2n n\u1eb7ng\n        $(\".cl_weight_package\").not('.is_html').each(function(index){\n            var weight_package = $(this).val();\n            if(!(weight_package > 0) && valid == true){\n                valid = false;\n                index_weight_error = index;\n                return;\n            }\n        });\n        if(valid == false){\n            $('.cl_weight_package').not('.is_html').eq(index_weight_error).focus();\n            swal(\"\",\"Please enter the weight\",\"error\");\n            return false;\n        }\n\n        var index_width_error = \"\";\n        \/\/ ki\u1ec3m tra nh\u1eadp chi\u1ec1u r\u1ed9ng\n        $(\".cl_width_package\").not('.is_html').each(function(index){\n            var width_package = $(this).val();\n            if(!(width_package > 0) && valid == true){\n                valid = false;\n                index_width_error = index;\n                return;\n            }\n        });\n        if(valid == false){\n            $('.cl_width_package').not('.is_html').eq(index_width_error).focus();\n            swal(\"\",\"Please enter the width\",\"error\");\n            return false;\n        }\n\n        var index_height_error = \"\";\n        \/\/ ki\u1ec3m tra nh\u1eadp chi\u1ec1u cao\n        $(\".cl_height_package\").not('.is_html').each(function(index){\n            var height_package = $(this).val();\n            if(!(height_package > 0) && valid == true){\n                valid = false;\n                index_height_error = index;\n                return;\n            }\n        });\n        if(valid == false){\n            $('.cl_height_package').not('.is_html').eq(index_height_error).focus();\n            swal(\"\",\"Please enter the height\",\"error\");\n            return false;\n        }\n\n        var index_depth_error = \"\";\n        \/\/ ki\u1ec3m tra nh\u1eadp chi\u1ec1u cao\n        $(\".cl_depth_package\").not('.is_html').each(function(index){\n            var depth_package = $(this).val();\n            if(!(depth_package > 0) && valid == true){\n                valid = false;\n                index_depth_error = index;\n                return;\n            }\n        });\n        if(valid == false){\n            $('.cl_depth_package').not('.is_html').eq(index_depth_error).focus();\n            swal(\"\",\"Please enter the length\",\"error\");\n            return false;\n        }\n        return valid;\n    }\n    function checkInputGoodPackage(){\n        var valid = true;\n        var valid_empty = false;\n        var valid_quantity = false;\n        var valid_price = false;\n        var input_quantity_error;\n        var input_price_error;\n        var good_name = '';\n\n        $(\".cl_good_name\").each(function(){\n            good_name = $(this).val();\n            if(good_name != '' && typeof(good_name) != 'undefined' && valid_empty == false){\n                valid_empty = true;\n            }\n        });\n        if(valid_empty == false){\n            $('.cl_good_name').eq(0).focus();\n            swal(\"\",\"Please enter the contents of the package\",\"error\");\n            valid = false;\n        } else{\n            $(\".cl_good_name\").each(function(){\n                good_name = $(this).val();\n                var good_item = $(this).parents('.good_item');\n                if(good_name != '' && typeof(good_name) != 'undefined'){\n                    var good_quantity = $('.cl_good_quantity',good_item).val();\n                    var good_price = $('.cl_good_price',good_item).val();\n                    if(valid == true){\n                        if(good_quantity == '' || good_quantity <= 0){\n                            $('.cl_good_quantity',good_item).focus();\n                            swal(\"\",\"Please enter the quantity of the goods \" + good_name,\"error\");\n                            valid = false;\n                            return;\n                        } else if(good_price == '' || good_price <= 0){\n                            $('.cl_good_price',good_item).focus();\n                            swal(\"\",\"Please enter the value of the goods \" + good_name,\"error\");\n                            valid = false;\n                            return;\n                        }\n                    }\n                }\n            });\n        }\n        return valid;\n    }\n    function createPackageHtml(){\n        var number_package = $('#number_package').val();\n        if(number_package > 0){\n            var _html_list_default = $(\"#tb_package_weight_dimension tbody\").html();\n            var _html_list = '';\n            for(var i = 1; i <= number_package; i++){\n                _html_list += _html_list_default;\n            }\n            _html_list = _html_list.replace(\/is_html\/g,'');\n            $(\"#list_package table tbody\").html(_html_list);\n            $(\"#list_package\").show();\n            $(\".cl_number_package\").each(function(index){\n                $(\".cl_number_package_index\",$(this)).html('Packages ' + (parseInt(index) + 1));\n            });\n            $(\".cl_weight_package_unit\").not('.is_html').each(function(){\n                $(this).change(function(){\n                    var _parent_elm = $(this).parents('.cl_number_package');\n                    var unit = $(this).val();\n                    if(unit == 'lbs'){\n                        $('.cl_dimension_package_unit',_parent_elm).val('inch');\n                    } else if(unit == 'kg'){\n                        $('.cl_dimension_package_unit',_parent_elm).val('cm');\n                    }\n                });\n            });\n            setActionInputPackage();\n        } else{\n            $(\"#list_package table tbody\").html(\"\");\n            $(\"#list_package\").hide();\n        }\n    }\n    var timeout_check_package_weight_dimension;\n    function setActionInputPackage(){\n        $(\".cl_weight_package\").not('.is_html').each(function(index){\n            $(this).keyup(function(){\n                alertValidPackageWeightDimension(index);\n            });\n        });\n        $(\".cl_width_package\").not('.is_html').each(function(index){\n            $(this).keyup(function(){\n                alertValidPackageWeightDimension(index);\n            });\n        });\n        $(\".cl_height_package\").not('.is_html').each(function(index){\n            $(this).keyup(function(){\n                alertValidPackageWeightDimension(index);\n            });\n        });\n        $(\".cl_depth_package\").not('.is_html').each(function(index){\n            $(this).keyup(function(){\n                alertValidPackageWeightDimension(index);\n            });\n        });\n    }\n    function alertValidPackageWeightDimension(inputIndex){\n        if(typeof(timeout_check_package_weight_dimension) != 'undefined') clearTimeout(timeout_check_package_weight_dimension);\n        timeout_check_package_weight_dimension = setTimeout(function(){\n            var width = parseFloat($(\".cl_width_package\").not('.is_html').eq(inputIndex).val());\n            var height = parseFloat($(\".cl_height_package\").not('.is_html').eq(inputIndex).val());\n            var depth = parseFloat($(\".cl_depth_package\").not('.is_html').eq(inputIndex).val());\n            var weight = parseFloat($(\".cl_weight_package\").not('.is_html').eq(inputIndex).val());\n            var weight_unit = $(\".cl_weight_package_unit\").not('.is_html').eq(inputIndex).val();\n            var dimension_unit = $(\".cl_dimension_package_unit\").not('.is_html').eq(inputIndex).val();\n            var dv_warning = $(\".cl_warning_package\").not('.is_html').eq(inputIndex);\n\n            if(width > 0 && height > 0 && depth > 0 && weight > 0){\n                var weight_dimension_text = '';\n                if(weight_unit == 'lbs' && dimension_unit == 'inch'){\n                    var weight_dimension = (width * height * depth) \/ 139;\n                    weight_dimension_text = \"(\"+width+\"x\"+height+\"x\"+depth+\" \/ 139 = \"+(Math.round(weight_dimension * 100) \/ 100)+\"lbs)\";\n                } else if(weight_unit == 'kg' && dimension_unit == 'cm'){\n                    var weight_dimension = (width * height * depth) \/ 5000;\n                    weight_dimension_text = \"(\"+width+\"x\"+height+\"x\"+depth+\" \/ 5000 = \"+(Math.round(weight_dimension * 100) \/ 100)+\"kg)\";\n                }\n                \/\/console.log('weight_dimension: ',weight_dimension);\n                \/\/console.log('weight_dimension_text: ',weight_dimension_text);\n                if(weight_dimension > weight){\n                    var warning_text = warning_weight_dimension.replace(\"[weight_dimensions]\",weight_dimension_text);\n                    $(\".text-danger\",dv_warning).html(warning_text);\n                    dv_warning.show();\n                } else {\n                    $(\".text-danger\",dv_warning).html(\"\");\n                    dv_warning.hide();\n                }\n            } else{\n                $(\".text-danger\",dv_warning).html(\"\");\n                dv_warning.hide();\n            }\n        },1000);\n    }\n\n    function checkValidPackageWeightDimension(){\n        var valid = true;\n        $(\".cl_width_package\").not('.is_html').each(function(inputIndex){\n            if(valid == true){\n                var width = parseFloat($(this).val());\n                var height = parseFloat($(\".cl_height_package\").not('.is_html').eq(inputIndex).val());\n                var depth = parseFloat($(\".cl_depth_package\").not('.is_html').eq(inputIndex).val());\n                var weight = parseFloat($(\".cl_weight_package\").not('.is_html').eq(inputIndex).val());\n                var weight_unit = $(\".cl_weight_package_unit\").not('.is_html').eq(inputIndex).val();\n                var dimension_unit = $(\".cl_dimension_package_unit\").not('.is_html').eq(inputIndex).val();\n                var dv_warning = $(\".cl_warning_package\").not('.is_html').eq(inputIndex);\n                if(width > 0 && height > 0 && depth > 0 && weight > 0){\n                    var weight_dimension_text = '';\n                    if(weight_unit == 'lbs' && dimension_unit == 'inch'){\n                        var weight_dimension = (width * height * depth) \/ 139;\n                        weight_dimension_text = \"(\"+width+\"x\"+height+\"x\"+depth+\" \/ 139 = \"+(Math.round(weight_dimension * 100) \/ 100)+\"lbs)\";\n                    } else if(weight_unit == 'kg' && dimension_unit == 'cm'){\n                        var weight_dimension = (width * height * depth) \/ 5000;\n                        weight_dimension_text = \"(\"+width+\"x\"+height+\"x\"+depth+\" \/ 5000 = \"+(Math.round(weight_dimension * 100) \/ 100)+\"kg)\";\n                    }\n                    \/\/console.log('weight_dimension: ',weight_dimension);\n                    \/\/console.log('weight_dimension_text: ',weight_dimension_text);\n                    if(weight_dimension > weight){\n                        var warning_text = warning_weight_dimension.replace(\"[weight_dimensions]\",weight_dimension_text);\n                        $(\".text-danger\",dv_warning).html(warning_text);\n                        dv_warning.show();\n                        valid = false;\n                    }\n                } else{\n                    $(\".text-danger\",dv_warning).html(\"\");\n                    dv_warning.hide();\n                }\n            }\n        });\n        return valid;\n    }\n    function estimatedCost(){\n        if(checkDataSender() == false){\n            return false;\n        }\n        if(checkInputPackage() == false){\n            return false;\n        }\n                var data_post = new Array();\n        var package_array = new Array();\n        $(\".cl_weight_package\").not('.is_html').each(function(index){\n            var weight_package = $(this).val();\n            var width_package = $('.cl_width_package').eq(index).val();\n            var height_package = $('.cl_height_package').eq(index).val();\n            var depth_package = $('.cl_depth_package').eq(index).val();\n            var weight_unit = $('.cl_weight_package_unit').eq(index).val();\n            var dimension_unit = $('.cl_dimension_package_unit').eq(index).val();\n            var key = package_array.length;\n            package_array[key] = new Array();\n            var obj_package = {\n                'weight': weight_package,\n                'weight_unit': weight_unit,\n                'width': width_package,\n                'height': height_package,\n                'depth': depth_package,\n                'dimension_unit': dimension_unit\n            }\n            package_array[key] = obj_package;\n        });\n        var package_json = JSON.stringify(package_array);\n        data_post.push({\n            \"name\": \"package\",\n            \"value\": package_json\n        });\n        var customer_array = new Array();\n        customer_array['name'] = 'Giang Vo';\n        customer_array['phone'] = '229 699 0642';\n        customer_array['email'] = '';\n        customer_array['postal_code'] = $('#sender_postal_code_check').val();\n        customer_array['address'] = '56 peach circle Cordele';\n        customer_array['state'] = '';\n        for(var i in customer_array){\n            if(i != 'each'){\n                data_post.push({\n                    \"name\": i,\n                    \"value\": customer_array[i]\n                });\n            }\n        }\n        var ship_date = $(\"#ship_date\").val();\n        data_post.push({\n            \"name\": \"ship_date\",\n            \"value\": ship_date\n        });\n        data_post.push({\n            \"name\": \"is_quick_qoute\",\n            \"value\": \"1\"\n        });\n        data_post.push({\n            \"name\": \"allow_self_ship\",\n            \"value\": 1\n        });\n        \/\/ g\u1eedi qua postmen\n        var l_btn = Ladda.create(document.querySelector('#btn-estimated-cost'));\n        $.ajax({\n            url: \"https:\/\/vietaircargo.com\/en\/\/wp-json\/custom\/1.0\/postmen-calculate-rates\",\n            dataType: \"json\",\n            data: data_post,\n            type: \"post\",\n            beforeSend: function(){\n               l_btn.start();\n                \/\/$(\"#number_package\").attr(\"readonly\",\"readonly\");\n                \/\/$(\"#ship_date\").attr(\"readonly\",\"readonly\");\n                \/\/$(\".form-add-product-ship-vn input[type=text]\").attr(\"readonly\",\"readonly\");\n                \/\/$(\".form-add-product-ship-vn select\").attr(\"readonly\",\"readonly\");\n            },\n            success: function( data ) {\n                l_btn.stop();\n                if (data.status == 200 && typeof(data.result) != 'undefined'){\n                    var _html_list_fee = data.result['html_choice'];\n                    for(var slug in data.result){\n                        var item_in_slug = data.result[slug];\n                    }\n                    $(\"#buyer_shipping_state\").val(data.result['sender_state']);\n                    $(\"#html_service_choice\").val(data.result['html_choice_json']);\n                    $(\"#ship_service_option\").val(data.result['ship_service_option']);\n                    $(\"#ship_fee_container\").html(_html_list_fee);\n                    $(\".cl_result_ship_fee\").show();\n                    \/\/$(\"#btn-re-estimated-cost\").show();\n                    $(\"#btn-estimated-cost\").hide();\n                    $(\"#city_vn\").removeAttr('disabled');\n                    \/\/$(\"#pn_cp_trongoi_thoigian\").show();\n                    setActionBoxPackageInput();\n                    setTimeout(function(){\n                        $(\"input[name=ship_fee_internal]\").each(function(){\n                            $(this).click(function(){\n                                calChiPhiTronGoi_ThoiGian();\n                            });\n                        });\n                        calChiPhiTronGoi_ThoiGian();\n                    },1000);\n                } else{\n                    swal(\"\",\"Weights or dimensions are invalid, please try again\",\"error\");\n                    $(\"#number_package\").removeAttr(\"disabled\");\n                    $(\"#ship_date\").removeAttr(\"readonly\");\n                    $(\".form-add-product-ship-vn input[type=text]\").removeAttr(\"readonly\");\n                    $(\".form-add-product-ship-vn select\").removeAttr(\"disabled\");\n                    $(\"#btn-estimated-cost\").show();\n                }\n            },\n            fail: function(data){\n                \/\/notify.update({'type': 'error','allow_dismiss' : true, 'message': '\u0110\u00e3 ph\u00e1t sinh l\u1ed7i', 'progress': 100});\n                l_btn.stop();\n                $(\"#number_package\").removeAttr(\"readonly\");\n                $(\"#ship_date\").removeAttr(\"readonly\");\n                $(\".form-add-product-ship-vn input[type=text]\").removeAttr(\"readonly\");\n                $(\".form-add-product-ship-vn select\").removeAttr(\"readonly\");\n            }\n        });\n    }\n    function calChiPhiTronGoi_ThoiGian(){\n        var phi_vn = 0;\n        var phi_noidia = 0;\n        var transit = 0;\n        var min_transit = 0;\n        var max_transit = 0;\n        \/\/ chi ph\u00ed v\u1eadn chuy\u1ec3n n\u1ed9i \u0111\u1ecba\n        var ship_fee_internal_selected = $(\"input[name=ship_fee_internal]:checked\");\n        \/\/console.log(ship_fee_internal_selected);\n        if(typeof(ship_fee_internal_selected) != 'undefined' && ship_fee_internal_selected.length > 0){\n            if(typeof(ship_fee_internal_selected.data('transit')) != 'undefined' && ship_fee_internal_selected.data('transit') > 0) {\n                transit = parseInt(ship_fee_internal_selected.data('transit'));\n            }\n            else if (typeof(ship_fee_internal_selected.data('max_transit')) != 'undefined' && ship_fee_internal_selected.data('max_transit') > 0){\n                min_transit = ship_fee_internal_selected.data('min_transit');\n                max_transit = ship_fee_internal_selected.data('max_transit');\n            }\n            phi_noidia = ship_fee_internal_selected.data('fee');\n            \/\/console.log('phi_noidia: ' + phi_noidia);\n            \/\/console.log('transit: ' + transit);\n            var phi_noidia_text = '';\n            if(phi_noidia > 0){\n                var currency = ship_fee_internal_selected.data('currency');\n                var name = ship_fee_internal_selected.data('name');\n                phi_noidia_text = phi_noidia+' '+currency+' (<em>'+name+'<\/em>)';\n            } else{\n                phi_noidia_text = '0 USD (<em>Customers send the goods to VietAir Cargo themselves<\/em>)';\n            }\n            $(\"#sp_phi_noidia\").html(phi_noidia_text);\n\n            var city_vn = $(\"#city_vn\").val();\n            if(city_vn > 0){\n                $('#sp_phi_tinhthanh').html('(<em>'+$(\"#city_vn option:selected\").text()+'<\/em>)');\n                $(\"#city_vn_name\").val($(\"#city_vn option:selected\").text());\n\n                var total_weight = getTotalWeightLBS();\n                getRateByWeight(total_weight,city_vn,phi_noidia,transit,max_transit,min_transit);\n            }\n            else{\n                showCalChiPhi(phi_noidia,phi_vn,transit,max_transit,min_transit);\n            }\n        }\n    }\n    function showCalChiPhi(phi_noidia,phi_vn,transit,max_transit,min_transit){\n        var tong_phi = Math.round((phi_noidia * 1 + phi_vn * 1) * 100) \/ 100;\n        $(\"#sp_tongphi\").html(tong_phi + ' USD');\n\n        var ship_date = $('#ship_date').val();\n        \/\/console.log('ship_date: ' + ship_date);\n        if(ship_date != ''){\n            $(\"#sp_tg_gui\").html(ship_date);\n            var ship_date_moment = moment(ship_date, \"DD\/MM\/YYYY\");\n            if(phi_noidia > 0){\n                var has_transit = false;\n                if(transit > 0){\n                    has_transit = true;\n                }\n                else if(max_transit > 0){\n                    has_transit = true;\n                }\n                if(has_transit == false) {\n                    transit = 5; \/\/ n\u1ebfu ng\u00e0y chuy\u1ec3n c\u1ee7a NCC kh\u00f4ng c\u00f3 th\u00ec l\u1ea5y 5 ng\u00e0y\n                }\n                \/\/console.log(transit);\n                \/\/ console.log(max_transit);\n                if(transit > 0){\n                    \/\/console.log('transit: ' + transit);\n                    var vac_date_moment = moment(ship_date, \"DD\/MM\/YYYY\").add(transit, 'days');\n                    var start_date = new Date(ship_date_moment.year(),ship_date_moment.month(),ship_date_moment.date());\n                    var end_date = new Date(vac_date_moment.year(),vac_date_moment.month(),vac_date_moment.date());\n                    var date_range = moment.range(start_date, end_date).toArray('days');\n                    \/\/console.log(date_range);\n                    var number_plus_date = 0;\n                    for(var i in date_range){\n                        if(i != 'each'){\n                            var date_in_range = moment(date_range[i]);\n                            var weekday = date_in_range.isoWeekday();\n                            \/\/console.log(weekday);\n                            if(weekday == 6 || weekday == 7){\n                                number_plus_date = 2;\n                            }\n                        }\n                    }\n                    \/\/console.log('date_range.length: ' + date_range.length - 1);\n                    \/\/console.log('number_plus_date: ' + number_plus_date);\n                    var end_date_in_range = date_range[date_range.length - 1];\n                    var vac_nhan = moment(end_date_in_range).add(number_plus_date,'days');\n                    \/\/ console.log('vac_nhan: ' + vac_nhan.format('DD\/MM\/YYYY'));\n                    var tg_vn_7 = moment(end_date_in_range).add(number_plus_date * 1 + 7,'days');\n                    var tg_vn_10 = moment(end_date_in_range).add(number_plus_date * 1 + 10,'days');\n                    \/\/console.log('tg_vn_7: ' + tg_vn_7.format('DD\/MM\/YYYY'));\n                    \/\/console.log('tg_vn_10: ' + tg_vn_10.format('DD\/MM\/YYYY'));\n                    tg_vac_nhan = vac_nhan.format('DD\/MM\/YYYY');\n                    tg_vn = 't\u1eeb ' + tg_vn_7.format('DD\/MM\/YYYY') + ' \u0111\u1ebfn ' + tg_vn_10.format('DD\/MM\/YYYY');\n                }\n                else if(max_transit > 0){\n                    \/*\n                     Ng\u00e0y b\u1eaft \u0111\u1ea7u g\u1eedi \u0111i: 30\/10\/2017\n                     Ng\u00e0y VietAir Cargo nh\u1eadn \u0111\u01b0\u1ee3c h\u00e0ng & xu\u1ea5t v\u1ec1 Vi\u1ec7t Nam: \bt\u1eeb 02\/11\/2017 \u0111\u1ebfn 06\/11\/2017\n                     \bNg\u00e0y h\u00e0ng \u0111\u1ebfn Vi\u1ec7t Nam & ti\u1ebfn h\u00e0nh giao h\u00e0ng: t\u1eeb 09\/11\/2017 \u0111\u1ebfn 1\u001d6\/11\/2017\n                     * *\/\n                    var vac_date_moment_min = moment(ship_date, \"DD\/MM\/YYYY\").add(min_transit, 'days');\n                    var start_date = new Date(ship_date_moment.year(),ship_date_moment.month(),ship_date_moment.date());\n                    var end_date = new Date(vac_date_moment_min.year(),vac_date_moment_min.month(),vac_date_moment_min.date());\n                    var date_range = moment.range(start_date, end_date).toArray('days');\n                    \/\/console.log(date_range);\n                    var number_plus_date = 0;\n                    for(var i in date_range){\n                        if(i != 'each'){\n                            var date_in_range = moment(date_range[i]);\n                            var weekday = date_in_range.isoWeekday();\n                            \/\/console.log(weekday);\n                            if(weekday == 6 || weekday == 7){\n                                number_plus_date = 2;\n                            }\n                        }\n                    }\n                    var end_date_in_range = date_range[date_range.length - 1];\n                    var vac_nhan = moment(end_date_in_range).add(number_plus_date,'days');\n                    \/\/ console.log('vac_nhan: ' + vac_nhan.format('DD\/MM\/YYYY'));\n                    var tg_vn_7 = moment(end_date_in_range).add(number_plus_date * 1 + 7,'days');\n\n                    var vac_date_moment_max = moment(ship_date, \"DD\/MM\/YYYY\").add(max_transit, 'days');\n                    var start_date = new Date(ship_date_moment.year(),ship_date_moment.month(),ship_date_moment.date());\n                    var end_date = new Date(vac_date_moment_max.year(),vac_date_moment_max.month(),vac_date_moment_max.date());\n                    var date_range = moment.range(start_date, end_date).toArray('days');\n                    \/\/console.log(date_range);\n                    var number_plus_date = 0;\n                    for(var i in date_range){\n                        if(i != 'each'){\n                            var date_in_range = moment(date_range[i]);\n                            var weekday = date_in_range.isoWeekday();\n                            \/\/console.log(weekday);\n                            if(weekday == 6 || weekday == 7){\n                                number_plus_date = 2;\n                            }\n                        }\n                    }\n                    var end_date_in_range = date_range[date_range.length - 1];\n                    var vac_nhan_max = moment(end_date_in_range).add(number_plus_date,'days');\n\n                    var tg_vn_10 = moment(end_date_in_range).add(number_plus_date * 1 + 10,'days');\n\n                    tg_vac_nhan = 't\u1eeb ' + vac_nhan.format('DD\/MM\/YYYY') + ' \u0111\u1ebfn ' + vac_nhan_max.format('DD\/MM\/YYYY');\n                    tg_vn = 't\u1eeb ' + tg_vn_7.format('DD\/MM\/YYYY') + ' \u0111\u1ebfn ' + tg_vn_10.format('DD\/MM\/YYYY');\n                }\n                $(\"#li_tg_vac_nhan\").show();\n                $(\"#sp_tg_vac_nhan\").html(tg_vac_nhan);\n                $(\"#sp_tg_vn\").html(tg_vn);\n            } else{\n                $(\"#li_tg_vac_nhan\").hide();\n                $(\"#sp_tg_vac_nhan\").html('');\n                $(\"#sp_tg_vn\").html(\"From 7 to 10 days from VietAir Cargo\");\n            }\n        }\n        $(\"#pn_cp_trongoi_thoigian\").show();\n        $(\"#dv-btn-continue-send-info\").show();\n    }\n    function getRateByWeight(total_weight,city_vn,phi_noidia,transit,max_transit,min_transit){\n        var url = 'https:\/\/vietaircargo.com\/en\/\/wp-json\/custom\/1.0\/get-rate-weight';\n        $.ajax({\n            url: url,\n            dataType: \"json\",\n            data: {\n                weight: total_weight,\n                loai_hanghoa: 2\n            },\n            type: \"post\",\n            beforeSend: function(){\n            },\n            success: function( data ) {\n                if (data.status == 200){\n                    var rate = 0;\n                    if(data.rate != 'undefined' && data.rate != null && data.rate > 0){\n                        rate = data.rate;\n                    }\n                    else{\n                        if(total_weight > 40){\n                            rate = 2.5;\n                        } else if(total_weight >= 20 && total_weight <= 40){\n                            rate = 2.6;\n                        } else if(total_weight < 20){\n                            rate = 2.7;\n                        }\n                    }\n                    \/\/console.log('city_vn: ' + city_vn);\n                    if(city_vn == 169){\n                        rate = rate * 1 + 0.5;\n                    } else if(city_vn != 98){\n                        rate = rate * 1 + 1;\n                    }\n                    \/\/console.log('rate: ' + rate);\n                    var phi_vn = Math.round(total_weight * rate * 100) \/ 100;\n                    $(\"#sp_phi_vn\").html(phi_vn + ' USD');\n                    showCalChiPhi(phi_noidia,phi_vn,transit,max_transit,min_transit);\n                }\n            },\n            fail: function(data){\n            }\n        });\n    }\n    function getTotalWeightLBS(){\n        var total_weight = 0;\n        $(\".cl_weight_package\").each(function(index){\n            var weight_unit = $('.cl_weight_package_unit').eq(index).val();\n            var weight = $(this).val();\n            if(weight_unit == 'kg'){\n                \/\/ \u0111\u1ed5i ra lbs\n                weight = Math.round(weight \/ 0.45359237 * 100) \/ 100;\n            }\n            total_weight += weight * 1;\n        });\n        return total_weight;\n    }\n    function convertWeight(value,from,to){\n        var return_value = 0;\n        if(from == 'oz' && to == 'lb'){\n            return_value = value * 0.0625;\n        }\n        else if(from == 'lb' && to == 'kg'){\n            return_value = value * 0.45359237;\n        }\n        else if(from == 'g' && to == 'kg'){\n            return_value = value * 0.001;\n        }\n        return parseFloat(return_value);\n    }\n    function setActionBoxPackageInput(){\n        $(\".form-add-product-ship-vn input[type=text]\").keyup(function(){\n            if($(\".cl_result_ship_fee\").css('display') != 'none'){\n                $(\"#btn-re-estimated-cost\").trigger('click');\n            }\n        });\n        $(\".form-add-product-ship-vn select\").change(function(){\n            if($(\".cl_result_ship_fee\").css('display') != 'none'){\n                $(\"#btn-re-estimated-cost\").trigger('click');\n            }\n        });\n    }\n    function submitFormShipToVN(){\n        var valid = false;\n        if(checkDataSenderInModal() == true){\n            valid = true;\n        } else return false;\n        if(checkDataReceiverInModal() == true){\n            valid = true;\n        } else return false;\n        $(\"#number_package\").removeAttr(\"disabled\");\n        $(\".form-add-product-ship-vn select\").removeAttr(\"disabled\");\n        if(checkInputPackage() == true){\n            valid = true;\n        } else {\n            \/\/$(\"#number_package\").attr(\"disabled\",\"disabled\");\n            \/\/$(\".form-add-product-ship-vn select\").attr(\"disabled\",\"disabled\");\n            return false;\n        }\n                \/\/ check ch\u1ecdn chi ph\u00ed v\u1eadn chuy\u1ec3n n\u1ed9i \u0111\u1ecba\n        if($(\"input[name=ship_fee_internal]:checked\").length > 0){\n            valid = true;\n        } else{\n            swal(\"\",\"Please select domestic shipping service\",\"error\");\n            return false;\n        }\n        if($(\"input[name=loai_thanhtoan]:checked\").length == 0){\n            swal(\"\",\"Please choose payment method\",\"error\");\n            return false;\n        }\n        if(checkInputGoodPackage() == true){\n            valid = true;\n        } else return false;\n        if(valid == true){\n            var data_post = $(\"#form-submit-send-info\").serializeArray();\n            var package_array = new Array();\n            $(\".cl_weight_package\").not('.is_html').each(function(index){\n                var weight_package = $(this).val();\n                var width_package = $('.cl_width_package').eq(index).val();\n                var height_package = $('.cl_height_package').eq(index).val();\n                var depth_package = $('.cl_depth_package').eq(index).val();\n                var weight_unit = $('.cl_weight_package_unit').eq(index).val();\n                var dimension_unit = $('.cl_dimension_package_unit').eq(index).val();\n                var key = package_array.length;\n                package_array[key] = new Array();\n                var obj_package = {\n                    'weight_package': weight_package,\n                    'weight_package_unit': weight_unit,\n                    'width_package': width_package,\n                    'height_package': height_package,\n                    'depth_package': depth_package,\n                    'dimension_package_unit': dimension_unit\n                }\n                package_array[key] = obj_package;\n            });\n            var package_json = JSON.stringify(package_array);\n            data_post.push({\n                \"name\": \"package\",\n                \"value\": package_json\n            });\n            var ship_fee_internal_selected = $(\"input[name=ship_fee_internal]:checked\").val();\n            data_post.push({\n                \"name\": \"ship_fee_internal\",\n                \"value\": ship_fee_internal_selected\n            });\n            var ship_date = $(\"#ship_date\").val();\n            data_post.push({\n                \"name\": \"ship_date\",\n                \"value\": ship_date\n            });\n\n            if(upload_photo_array.length > 0){\n                data_post.push({\n                    'name': 'order_photo',\n                    'value': upload_photo_array\n                });\n            }\n            var url = 'https:\/\/vietaircargo.com\/en\/\/wp-json\/custom\/1.0\/user-quote-ship-to-vn';\n            var l_btn = Ladda.create(document.querySelector('#btn-submit-send-info'));\n            $.ajax({\n                url: url,\n                dataType: \"json\",\n                data: data_post,\n                type: \"post\",\n                beforeSend: function(){\n                    l_btn.start();\n                },\n                success: function( data ) {\n                    l_btn.stop();\n                    if (data.status == 200){\n                        var id = $(\"#id\").val();\n                        window.location = '\/uoc-tinh-chuyen-hang-ve-viet-nam\/?result=success';\n                    } else if (data.status == 400){\n                        if(typeof(data.input) != 'undefined'){\n                            $(\"#\"+data.input).focus();\n                        }\n                        swal(\"\",data.message,\"error\");\n                    }\n                },\n                fail: function(data){\n                    l_btn.stop();\n                }\n            });\n        }\n        return false;\n    }\n    function resortGoodInPackage(){\n        $('.good_item').each(function(index){\n            $('.cl_good_stt',$(this)).html(parseInt(index) + 1);\n        });\n    }\n    function removeGoodInPackage(_this){\n        var good_item = $(_this).parents('.good_item');\n        var good_name = $('.cl_good_name',good_item).val();\n        var good_id = $('.cl_good_id',good_item).val();\n        if(good_name != '' && typeof(good_name) != 'undefined'){\n            if(confirm('Do you really want to delete this merchandise?')){\n                good_item.remove();\n            }\n        } else {\n            good_item.remove();\n        }\n        if(typeof(good_id) != 'undefined' && good_id > 0){\n            var ls_good_id = $(\"#ls_good_delete\").val();\n            if(ls_good_id == '') ls_good_id = good_id;\n            else ls_good_id += ',' + good_id;\n            $(\"#ls_good_delete\").val(ls_good_id);\n        }\n        resortGoodInPackage();\n    }\n    $(document).ready(function (event) {\n        $(\"#number_package\").change(function(){\n            createPackageHtml();\n            if($(\".cl_result_ship_fee\").css('display') != 'none'){\n                $(\"#btn-re-estimated-cost\").trigger('click');\n            }\n        });\n        setActionBoxPackageInput();\n        $(\"#btn-submit-send-info\").click(function(){\n            submitFormShipToVN();\n        });\n        $(\"#btn-estimated-cost\").click(function(){\n            estimatedCost();\n        });\n        $(\"#btn-send-info\").click(function(){\n            $('#sender_postal_code').val($('#sender_postal_code_check').val());\n            $(\"#sender_postal_code\").trigger(\"keyup\");\n            $(\"#continue_send_info_modals\").modal(\"show\");\n        });\n        $(\"#btn-re-estimated-cost\").click(function(){\n            $(\"#ship_fee_container\").html('');\n            $(\".cl_result_ship_fee\").hide();\n            $(\"#btn-re-estimated-cost\").hide();\n            $(\"#btn-estimated-cost\").show();\n            $(\"#pn_cp_trongoi_thoigian\").hide();\n           \/\/ $(\"#city_vn\").attr('disabled','disabled').val(0);\n           \/\/ $(\"#city_vn_name\").val(\"\");\n            $(\"#number_package\").removeAttr(\"readonly\");\n            $(\"#ship_date\").removeAttr(\"readonly\");\n            $(\".form-add-product-ship-vn input[type=text]\").removeAttr(\"readonly\");\n            $(\".form-add-product-ship-vn select\").removeAttr(\"readonly\");\n\n            $(\"#sp_tg_vac_nhan\").html('');\n            $(\"#li_tg_vac_nhan\").hide();\n            $(\"#sp_tg_vn\").html('');\n            $(\"#sp_tg_gui\").html('');\n            $(\"#sp_tongphi\").html('');\n            $(\"#sp_phi_vn\").html('');\n            $(\"#sp_phi_noidia\").html('');\n            $('#sp_phi_tinhthanh').html('');\n\n            $(\"#dv-btn-continue-send-info\").hide();\n        });\n        $(\"#btn-add-more-good\").click(function(){\n            var _html_default = '<tr class=\"good_item\">' +\n                    '<td align=\"center\" style=\"vertical-align: middle\"><a href=\"javascript: void(0);\" onclick=\"removeGoodInPackage(this)\"><i class=\"fa fa-remove\"><\/i><\/a><\/td>' +\n                    '<td class=\"cl_good_stt\" align=\"center\" style=\"vertical-align: middle\"><\/td>' +\n                    '<td><input type=\"text\" name=\"good_name[]\" value=\"\" class=\"form-control cl_good_name\" placeholder=\"\" \/><\/td>' +\n                    '<td><input type=\"number\" min=\"1\" name=\"good_quantity[]\" value=\"\" class=\"form-control cl_good_quantity\" placeholder=\"\" \/><\/td>' +\n                    '<td><input type=\"number\" name=\"good_price[]\" value=\"\" class=\"form-control cl_good_price\" placeholder=\"\" \/><\/td>' +\n                '<\/tr>';\n            $('#good_in_package table tbody').append(_html_default);\n            resortGoodInPackage();\n        });\n        $(\"#city_vn\").change(function(){\n            calChiPhiTronGoi_ThoiGian();\n        });\n        var dateToday = new Date();\n        $(\"#ship_date\").datepicker({\n            dateFormat: \"dd\/mm\/yy\",\n            minDate: dateToday,\n            maxDate: \"+4d\",\n            onSelect: function (dateText, inst) {\n                var ship_date_moment = moment($(\"#ship_date\").val(), \"DD\/MM\/YYYY\");\n                var week_day = ship_date_moment.isoWeekday();\n                if(week_day == 6 || week_day == 7){\n                    $(\"#ship_date\").val(\"\").focus();\n                    swal(\"\",\"Please select another day, the carrier will only ship from Monday to Friday\",\"error\");\n                }\n                else {\n                    calChiPhiTronGoi_ThoiGian();\n                }\n            }\n        });\n        $(\"#is_receiver_vac_vn\").click(function(){\n            if($(this).is(\":checked\")){\n                if($(\"#ship_vn_name\").length > 0){\n                    $(\".hide_is_receiver_vac_vn\").hide();\n                    $(\"#ship_vn_name\").focus();\n                } else{\n                    $(\"#dv_receiver_vac_vn\").show();\n                    $(\"#receiver_shipping_stvn\").attr(\"disabled\",\"disabled\").val(\"\");\n                    $(\"#receiver_name\").val(\"\").removeAttr(\"readonly\").focus();\n                    $(\"#receiver_phone\").val(\"\").removeAttr(\"readonly\");\n                    $(\"#receiver_email\").val(\"\").removeAttr(\"readonly\");\n                    $(\"#row_receiver_zone\").hide();\n                    $(\"#sp_receiver_district_name\").html(\"\");\n                    $(\"#sp_receiver_city_name\").html(\"\");\n                }\n                $(\"#city_vn\").val(98); \/\/ n\u1ed9i th\u00e0nh\n                $('#sp_phi_tinhthanh').html('(<em>Urban Sai Gon City<\/em>)');\n            } else {\n                if($(\"#ship_vn_name\").length > 0){\n                    $(\".hide_is_receiver_vac_vn\").show();\n                } else{\n                    $(\"#dv_receiver_vac_vn\").hide();\n                    $(\"#receiver_shipping_stvn\").removeAttr(\"disabled\");\n                    $(\"#receiver_name\").val(\"\").attr(\"readonly\",\"readonly\");\n                    $(\"#receiver_phone\").val(\"\").attr(\"readonly\",\"readonly\");\n                    $(\"#receiver_email\").val(\"\").attr(\"readonly\",\"readonly\");\n                    $(\"#receiver_vac_vn\").val(\"\");\n                }\n                $(\"#city_vn\").val(-1); \/\/ c\u00e1c t\u1ec9nh kh\u00e1c\n                $('#sp_phi_tinhthanh').html('');\n            }\n            calChiPhiTronGoi_ThoiGian();\n        });\n        $(\"#sender_postal_code\").keyup(function(){\n            $this = $(this);\n            if(typeof(timeout_get_state_city) != 'undefined') clearTimeout(timeout_get_state_city);\n            var zip_code = $this.val();\n            $(\"#sender_state\").val('');\n            $(\"#sender_state_city\").val('');\n            if(zip_code != ''){\n                timeout_get_state_city = setTimeout(function(){\n                    if(!isNaN(zip_code) && (zip_code.length == 4 || zip_code.length == 5)){\n                        if(typeof(zip_code_array[zip_code]) != 'undefined'){\n                            var select_state_city = '';\n                            $.each(zip_code_array[zip_code]['city'],function(city_key,city_name){\n                                var selected = '';\n                                if(city_selected != '' && city_selected == city_name){\n                                    selected = 'selected';\n                                }\n                                else if(city_key == 0 && city_selected == ''){\n                                    selected = 'selected';\n                                    city_selected = city_name;\n                                }\n                                select_state_city += '<option value=\"'+city_name+'\" '+selected+'>'+city_name+'<\/option>';\n                            });\n                            $(\"#sender_address\").focus();\n                            $(\"#sender_state_city\").html(select_state_city).val(city_selected).show();\n                            $(\"#sender_state\").val(zip_code_array[zip_code]['state']);\n                            $(\".dv_state_city\").show();\n                        } else{\n                            jQuery.ajax({\n                                url: 'https:\/\/vietaircargo.com\/en\/\/wp-json\/custom\/1.0\/get-state-city-by-zipcode',\n                                dataType: \"json\",\n                                data: {\n                                    \"zip_code\": zip_code\n                                },\n                                type: \"get\",\n                                beforeSend: function(){\n                                    $(\"#sender_postal_code\").attr('disabled','disabled');\n                                    $(\".dv_state_city_loading\").show();\n                                    $(\".dv_state_city\").hide();\n                                    $(\"#sender_state\").val('');\n                                    $(\"#sender_state_city\").html('');\n                                },\n                                success: function( data ) {\n                                    $(\"#sender_postal_code\").removeAttr('disabled');\n                                    $(\".dv_state_city_loading\").hide();\n                                    if (data.status == 200){\n                                        var select_state_city = '';\n                                        $.each(data.result.city,function(city_key,city_name){\n                                            var selected = '';\n                                            if(city_selected != '' && city_selected == city_name){\n                                                selected = 'selected';\n                                            }\n                                            else if(city_key == 0 && city_selected == ''){\n                                                selected = 'selected';\n                                                city_selected = city_name;\n                                            }\n                                            select_state_city += '<option value=\"'+city_name+'\" '+selected+'>'+city_name+'<\/option>';\n                                        });\n                                        $(\"#sender_address\").focus();\n                                        $(\"#sender_state_city\").html(select_state_city).val(city_selected).show();\n                                        $(\"#sender_state\").val(data.result.state);\n                                        $(\".dv_state_city\").show();\n                                        zip_code_array[data.result.zipcode] = new Array();\n                                        zip_code_array[data.result.zipcode]['state'] = data.result.state;\n                                        zip_code_array[data.result.zipcode]['city'] = data.result.city;\n                                    } else{\n                                        $(\"#sender_state_city\").html('').hide();\n                                        $(\"#sender_postal_code\").focus();\n                                        $(\".dv_state_city\").hide();\n                                        swal('',data.message,'error');\n                                    }\n                                },\n                                fail: function(data){\n                                    $(\"#sp_state\").html('').hide();\n                                    $(\"#sender_state_city\").html('').hide();\n                                    $(\"#sender_postal_code\").focus();\n                                    $(\".dv_state_city\").hide();\n                                }\n                            });\n                        }\n                    } else{\n                        jQuery(\"#sender_postal_code\").focus();\n                        swal('','Zip code must be 4-5 digits','error');\n                    }\n                },1000);\n            }\n        });\n        $(\"#sender_email\").keyup(function(){\n            if(typeof(timeout_email_get_info) != 'undefined') clearTimeout(timeout_email_get_info);\n            var email = $(this).val();\n            if(typeof(email) != 'undefined' && email != \"\" && email != null && validEmail(email) == true){\n                timeout_email_get_info = setTimeout(function(){\n                    $.ajax({\n                        url: 'https:\/\/vietaircargo.com\/en\/\/wp-json\/custom\/1.0\/get-info-by-email',\n                        dataType: \"json\",\n                        data: {\n                            \"email\": email\n                        },\n                        type: \"get\",\n                        beforeSend: function(){\n                        },\n                        success: function( data ) {\n                            if (data.status == 200){\n                                var result = data.result;\n\n                                city_selected = result.city_name;\n\n                                $(\"#sender_name\").val(result.name);\n                                $(\"#sender_phone\").val(result.phone);\n                                $(\"#sender_address\").val(result.address_origin);\n                                $(\"#sender_postal_code\").val(result.postal_code);\n                                $(\"#sender_state\").val(result.state_name);\n                                $(\"#sender_state_city\").val(city_selected);\n                            }\n                        },\n                        fail: function(data){\n                        }\n                    });\n                },1500);\n            }\n        });\n        if($(\"#upload_photo_box\").length > 0){\n            var attachfile_order_photo = [];\n            var photo_file_upload_sync_name = [];\n            new Dropzone(\"div#upload_photo_box\", {\n                init: function () {\n                    var thisDropzone = this;\n                    thisDropzone.on(\"complete\", function (file) {\n                        if (this.getUploadingFiles().length === 0 && this.getQueuedFiles().length === 0) {\n                            $(\"button\").removeAttr(\"disabled\");\n                        }\n                    });\n                    thisDropzone.on(\"successmultiple\", function (file) {\n                        var args = Array.prototype.slice.call(arguments);\n                        if (typeof(args[1]) != 'undefined') {\n                            var data = args[1];\n                            console.log(data);\n                            if (data.code == 200) {\n                                var file_uploaded_array = data.file;\n                                if(file_uploaded_array.length > 0){\n                                    for(var i in file_uploaded_array){\n                                        if(i != 'each'){\n                                            upload_photo_array[upload_photo_array.length] = file_uploaded_array[i];\n                                            photo_file_upload_sync_name[args[0][i].name] = file_uploaded_array[i];\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    });\n                    thisDropzone.on(\"sending\", function(file, xhr, formData){\n                        formData.append(\"upload_photo\", 1);\n                        $(\"button\").attr(\"disabled\", \"disabled\");\n                    });\n                    thisDropzone.on(\"removedfile\", function (file){\n                        if($(\".dz-image-preview\").length > 0){\n                            $(\".dz-default.dz-message\").css('display','none');\n                        } else{\n                            $(\".dz-default.dz-message\").css('display','block');\n                        }\n                        if(typeof(file.upload) != 'undefined'){\n                            if(typeof(photo_file_upload_sync_name[file.name]) != 'undefined'){\n                                $.post('https:\/\/vietaircargo.com\/en\/\/wp-json\/custom\/1.0\/remove-file', {file: photo_file_upload_sync_name[file.name]});\n                            }\n                        } else{\n                            var order_id = $(\"#id\").val();\n                            $.post('https:\/\/vietaircargo.com\/en\/\/wp-json\/custom\/1.0\/remove-file', {file: file.name, order_id: order_id});\n                            order_photo_deleted[order_photo_deleted.length] = file.name;\n                        }\n                    });\n\n                    thisDropzone.on(\"addedfile\", function(file) {\n                        if(typeof(file.url) != 'undefined'){\n                            var allow_click = true;\n                            if(photo_file_set_click.length > 0){\n                                for(var i in photo_file_set_click.length){\n                                    if(photo_file_set_click.length[i] == file.name){\n                                        allow_click = false;\n                                    }\n                                }\n                            }\n                            if(allow_click == true){\n                                file.previewElement.addEventListener(\"click\", function() {\n                                    setFancyboxGallery(file.index);\n                                });\n                                photo_file_set_click[file.index] = file.name;\n                                order_photo_gallery[order_photo_gallery.length] = file.url;\n                            }\n                            $(\".dz-default.dz-message\").css('display','none');\n                        }\n                    });\n                    if (attachfile_order_photo.length > 0) {\n                        $.each(attachfile_order_photo, function (key, value) {\n                            var mockFile = {index: key, name: value.name, size: value.size, url: value.url};\n                            thisDropzone.emit(\"addedfile\", mockFile);\n                            thisDropzone.emit(\"thumbnail\", mockFile, value.url);\n                            thisDropzone.createThumbnailFromUrl(mockFile, value.url, null, \"Anonymous\");\n                            thisDropzone.emit(\"complete\", mockFile);\n                        });\n                    }\n                },\n                url: \"https:\/\/vietaircargo.com\/en\/\/wp-json\/custom\/1.0\/upload-multi-photo\",\n                addRemoveLinks: true,\n                dictDefaultMessage: \"Drag and drop images or click here to upload\",\n                paramName: \"file\", \/\/ The name that will be used to transfer the file\n                maxFilesize: 10, \/\/ MB,\n                parallelUploads: 2,\n                uploadMultiple: true,\n                acceptedFiles: 'image\/*',\n                accept: function (file, done) {\n                    done();\n                }\n            });\n        }\n        if($('#ship_vn_country').length > 0){\n            $(\"#ship_vn_country\").change(function(){\n                var vl = $(this).val();\n                if (vl) {\n                    var url = 'https:\/\/vietaircargo.com\/wp-content\/plugins\/custom_user\/apis\/datasource\/';\n                    url += 'provice.json';\n\n                    jQuery.get(url, function (data) {\n                        if (data) {\n                            ship_vn_currentProvince = data;\n                            jQuery('#ship_vn_receiverCity').html('');\n                            jQuery('#ship_vn_receiverDistrict').html('<option value=\"\" selected>Choose a district<\/option>');\n\n                            var _html = '<option value=\"\" selected>Choose city\/province<\/option>';\n                            jQuery.each(data, function (i, v) {\n                                _html += '<option value=\"'+ v.name +'\">'+ v.name +'<\/option>';\n                            });\n                            jQuery('#ship_vn_receiverCity').html(_html);\n                        }\n                    })\n\n\n                    jQuery(\"#div_phone_user_tabordermanager\").find( \"#basic-addon1\" ).remove();\n                    if(vl==\"M\u1ef9\"){\n                        jQuery( \"#div_phone_user_tabordermanager\" ).prepend( \"<span class='input-group-addon' id='basic-addon1' style='border-color: rgba(35,35,35,1) !important;border-bottom: 2px solid #dedede;'>+1<\/span>\" );\n                        jQuery( \"input#ship_vn_phone\" ).addClass( \"phone_name_class_tabordermanager\" );\n                    }else if(vl==\"Vi\u1ec7t Nam\"){\n                        jQuery( \"#div_phone_user_tabordermanager\" ).prepend( \"<span class='input-group-addon' id='basic-addon1' style='border-color: rgba(35,35,35,1) !important;border-bottom: 2px solid #dedede;'>+84<\/span>\" );\n                        jQuery( \"input#ship_vn_phone\" ).addClass( \"phone_name_class_tabordermanager\" );\n                    }else{\n                        jQuery( \"input#ship_vn_phone\" ).removeClass( \"phone_name_class_tabordermanager\" );\n                    }\n                }\n            });\n            $(\"#ship_vn_receiverCity\").change(function(){\n                $this = jQuery(this);\n                var vl = $this.val();\n\n                if (vl) {\n                    jQuery('#ship_vn_receiverDistrict').html('');\n\n                    jQuery.each(ship_vn_currentProvince, function (i, v) {\n                        if (vl == v.name) {\n                            var _html = '<option value=\"\" selected>Choose a district<\/option>';\n                            jQuery.each(v.district, function (j, _v) {\n                                _html += '<option value=\"'+ _v +'\">'+ _v +'<\/option>';\n                            });\n                            jQuery('#ship_vn_receiverDistrict').html(_html);\n                            if(vl == 'S\u00e0i G\u00f2n'){\n                                $(\"#city_vn\").val(98); \/\/ n\u1ed9i th\u00e0nh\n                                $('#sp_phi_tinhthanh').html('(<em>Urban Sai Gon City<\/em>)');\n                            } else{\n                                $(\"#city_vn\").val(-1); \/\/ t\u1ec9nh kh\u00e1c\n                                $('#sp_phi_tinhthanh').html('(<em>'+vl+'<\/em>)');\n                            }\n                        }\n                    });\n\n                }\n            });\n            $(\"#ship_vn_receiverDistrict\").change(function(){\n                var city_name = $(\"#ship_vn_receiverCity\").val();\n                var district_name = $(this).val();\n                if(city_name == 'S\u00e0i G\u00f2n'){\n                    $(\"#city_vn\").val(98); \/\/ n\u1ed9i th\u00e0nh\n                    $('#sp_phi_tinhthanh').html('(<em>Urban Sai Gon City<\/em>)');\n                    if(district_name == 'Huy\u1ec7n B\u00ecnh Ch\u00e1nh' || district_name == 'Huy\u1ec7n C\u1ea7n Gi\u1edd' || district_name == 'Huy\u1ec7n C\u1ee7 Chi' || district_name == 'Huy\u1ec7n H\u00f3c M\u00f4n' || district_name == 'Huy\u1ec7n Nh\u00e0 B\u00e8' || district_name == 'Qu\u1eadn 9' || district_name == 'Qu\u1eadn 12' || district_name == 'Qu\u1eadn 2' || district_name == 'Qu\u1eadn Th\u1ee7 \u0110\u1ee9c'){\n                        $(\"#city_vn\").val(169); \/\/ ngo\u1ea1i th\u00e0nh\n                        $('#sp_phi_tinhthanh').html('(<em>Suburban Sai Gon City<\/em>)');\n                    }\n                } else{\n                    $(\"#city_vn\").val(-1); \/\/ t\u1ec9nh kh\u00e1c\n                    $('#sp_phi_tinhthanh').html('(<em>'+city_name+'<\/em>)');\n                }\n            });\n            $('#ship_vn_country').trigger('change');\n        }\n    }).on('click', '.active-tab1', function (event) {\n        event.preventDefault();\n        $('.nav-tabs [href=\"#tab1\"]').trigger('click');\n\n    });\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"Estimate Shipping Fees & Delivery Time To Send Packages From the U.S. to VietNam With our Ship from the U.S. to Vietnam service, customers from anywhere within the United States [...]","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"yst_prominent_words":[],"class_list":["post-328858","page","type-page","status-publish"],"_links":{"self":[{"href":"https:\/\/vietaircargo.com\/en\/wp-json\/wp\/v2\/pages\/328858\/"}],"collection":[{"href":"https:\/\/vietaircargo.com\/en\/wp-json\/wp\/v2\/pages\/"}],"about":[{"href":"https:\/\/vietaircargo.com\/en\/wp-json\/wp\/v2\/types\/page\/"}],"author":[{"embeddable":true,"href":"https:\/\/vietaircargo.com\/en\/wp-json\/wp\/v2\/users\/4\/"}],"replies":[{"embeddable":true,"href":"https:\/\/vietaircargo.com\/en\/wp-json\/wp\/v2\/comments\/?post=328858"}],"version-history":[{"count":0,"href":"https:\/\/vietaircargo.com\/en\/wp-json\/wp\/v2\/pages\/328858\/revisions\/"}],"wp:attachment":[{"href":"https:\/\/vietaircargo.com\/en\/wp-json\/wp\/v2\/media\/?parent=328858"}],"wp:term":[{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/vietaircargo.com\/en\/wp-json\/wp\/v2\/yst_prominent_words\/?post=328858"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}