Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.getJSON('http://<?php echo env('HTTP_HOST');?>/orders/getAccountDetailsJson/'+parseInt(selectedId), function(data){
- var fullAddress = data['billingAddress']['street1']+', \n '+ data['billingAddress']['city']+', '+data['billingAddress']['state']+', \n '+ data['billingAddress']['postalCode']+', ' + data['billingAddress']['country'];
- var fullShippingAddress = data['shippingAddress']['street1']+', \n '+ data['shippingAddress']['city']+', '+data['shippingAddress']['state']+', \n '+ data['shippingAddress']['postalCode']+', ' + data['shippingAddress']['country'];
- console.log(fullAddress);
- console.log(fullShippingAddress);
- $('#billing_address_street1').val(data['billingAddress']['street1']);
- $('#billing_address_city').val(data['billingAddress']['city']);
- $('#billing_address_state').val(data['billingAddress']['state']);
- $('#billing_address_postalcode').val(data['billingAddress']['postalCode']);
- $('#billing_address_country').val(data['billingAddress']['country']);
- $('#dealerAddressField').val(fullAddress);
- $('#dealerShippingAddressField').val(fullShippingAddress);
- $('#shipping_address_street1').val(data['shippingAddress']['street1']);
- $('#shipping_address_city').val(data['shippingAddress']['city']);
- $('#shipping_address_state').val(data['shippingAddress']['state']);
- $('#shipping_address_postalcode').val(data['shippingAddress']['postalCode']);
- $('#shipping_address_country').val(data['shippingAddress']['country']);
- $('#companyNameId').val(data['dealernameCstm']);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement