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",
url: "https://thongtindoanhnghiep.co/api/company/3901212654",
// data: { // data: {
// "taxcode": taxcode // "taxcode": taxcode
// }, // },
// dataType: "json", dataType: "json",
// type: 'GET', type: 'GET',
// beforeSend: function () { beforeSend: function () {
// $('.loading').css('display','block'); $('.loading').css('display','block');
// }, },
// success: function( response ) { success: function( response ) {
// $('.loading').css('display','none'); $('.loading').css('display','none');
// // console.log(response); // console.log(response);
// if (response.code == 400) { if (response.code == 400) {
// noti.text(response.message); noti.text(response.message);
// noti.css('display','block'); noti.css('display','block');
// $( 'input#billing_company' ).val(''); $( 'input#billing_company' ).val('');
// $( 'input#billing_city' ).val(''); $( 'input#billing_city' ).val('');
// } }
// if (response.code == 200) { if (response.code == 200) {
// var info = response.data; var info = response.data;
// noti.css('display','none'); noti.css('display','none');
// noti.remove(); 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