0

I understand that, by default, Magento doesn't expose the vat_id field via SOAP. The accepted answer there is to edit the core/add a module. Unfortunately, I don't have such luxury because I don't have the filesystem access to Magento: I have just the basic SOAP access and I cannot do any modification.

So: how do I retrive the vat_id via SOAP from a Magento ver. 1.9.4.2?

This is what I've tried so far:

$result = $proxy->salesOrderInfo($sessionId, '200000006');
$customer = $proxy->customerCustomerInfo($sessionId, '765');
$addresses =  = $proxy->customerAddressList($sessionId, '765');

foreach $addresses:
  $proxy->customerAddressList($sessionId, '211');

Unfortunately, the vat_id is nowhere to be seen.

What can I do?

1 Answer 1

0

This is my solution: copy the vat_idto the taxvat field in the checkout page, then use taxvat from SOAP:

<script>
    jQuery(document).on('change', '#billing\\:vat_id', function() {

        var vat = jQuery(this).val();
        jQuery('#billing\\:taxvat').val(vat);
    });
</script>

(jQuery required)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.