Commit 9ec1ec7d by Pham Huy

update url api get mst

parent 51a6a7d7
...@@ -68,55 +68,56 @@ if ( ! $checkout->is_registration_enabled() && $checkout->is_registration_requir ...@@ -68,55 +68,56 @@ if ( ! $checkout->is_registration_enabled() && $checkout->is_registration_requir
jQuery(document).ready(function ( $ ) { jQuery(document).ready(function ( $ ) {
var loading = $('.loading'); var loading = $('.loading');
var noti = $('.notify-mst'); var noti = $('.notify-mst');
// $( 'i#search-taxcode' ).on( 'click', function() { $( 'i#search-taxcode' ).on( 'click', function() {
// $(this).append(loading); $(this).append(loading);
// $('#mst_checkout_field_field').append(noti); $('#mst_checkout_field_field').append(noti);
// var taxcode = $('input#mst_checkout_field').val(); var taxcode = $('input#mst_checkout_field').val();
// $('input#mst_checkout_field').val(taxcode.trim()); $('input#mst_checkout_field').val(taxcode.trim());
// $.ajax({ $.ajax({
// url: "http://edupham.com/api/v1/get-company-info-by-taxcode", // url: "http://edupham.com/api/v1/get-company-info-by-taxcode",
// data: { url: "https://thongtindoanhnghiep.co/api/company/3901212654",
// "taxcode": taxcode // data: {
// }, // "taxcode": taxcode
// dataType: "json", // },
// type: 'GET', dataType: "json",
// beforeSend: function () { type: 'GET',
// $('.loading').css('display','block'); beforeSend: function () {
// }, $('.loading').css('display','block');
// success: function( response ) { },
// $('.loading').css('display','none'); success: function( response ) {
// // console.log(response); $('.loading').css('display','none');
// if (response.code == 400) { // console.log(response);
// noti.text(response.message); if (response.code == 400) {
// noti.css('display','block'); noti.text(response.message);
// $( 'input#billing_company' ).val(''); noti.css('display','block');
// $( 'input#billing_city' ).val(''); $( 'input#billing_company' ).val('');
// } $( 'input#billing_city' ).val('');
// if (response.code == 200) { }
// var info = response.data; if (response.code == 200) {
// noti.css('display','none'); var info = response.data;
// noti.remove(); noti.css('display','none');
// } noti.remove();
}
// if ( info ) { if ( info ) {
// // $( 'input#_billing_first_name' ).val( info.Title ); // $( 'input#_billing_first_name' ).val( info.Title );
// // $( 'input#_billing_last_name' ).val( info.billing_last_name ); // $( 'input#_billing_last_name' ).val( info.billing_last_name );
// $( 'input#billing_company' ).val( info.Title ); $( 'input#billing_company' ).val( info.Title );
// // $( 'input#_billing_address_1' ).val( info.billing_address_1 ); // $( 'input#_billing_address_1' ).val( info.billing_address_1 );
// // $( 'input#_billing_address_2' ).val( info.billing_address_2 ); // $( 'input#_billing_address_2' ).val( info.billing_address_2 );
// $( 'input#billing_city' ).val( info.TinhThanhTitle ); $( 'input#billing_city' ).val( info.TinhThanhTitle );
// // $( '#_billing_country' ).val( info.billing_country ); // $( '#_billing_country' ).val( info.billing_country );
// // $( 'input#_billing_state' ).val( info.billing_state ); // $( 'input#_billing_state' ).val( info.billing_state );
// // $( 'input#_billing_email' ).val( info.billing_email ); // $( 'input#_billing_email' ).val( info.billing_email );
// // $( 'input#_billing_phone' ).val( info.billing_phone ); // $( 'input#_billing_phone' ).val( info.billing_phone );
// // $( 'input#_billing_vat' ).val( info.billing_vat ); // $( 'input#_billing_vat' ).val( info.billing_vat );
// } }
// $( '.edit_address' ).unblock(); $( '.edit_address' ).unblock();
// } }
// }); });
// }); });
}); });
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment