Herzlich willkommen

Compatibility

Below you will find instructions to work around compatibility issues with other third party extensions.

Magestore Onestepcheckout

To ensure compatibility and full functionality of EU VAT Enhanced with Magestore Onestepcheckout, certain steps must be executed. Follow the guide below:

1. Modify VAT Number Input Field IDs at Checkout

Firstly, navigate to app/design/frontend/base/default/template/onestepcheckout/onestepcheckout/billing.phtml, copy it, and then paste it into the matching folder within your design folder. Modify the copied file by adding an elseif case within the field loop. The snippet should look like this:

<?php elseif($helper->getFieldEnable($i)=='taxvat'): ?>
    <label for="billing:vat_id"><?php echo $this->__('Tax/VAT number') ?></label><br/>
    <input type="text" name="billing[vat_id]" id="billing:vat_id" value="" title="<?php echo $this->__('Tax/VAT number') ?>" class="input-text">

Repeat this process for the shipping address template located at app/design/frontend/base/default/template/onestepcheckout/onestepcheckout/shipping.phtml. The resulting code should mirror the example above.

2. Update the Onestepcheckout Controller

Now, head to app/code/local/Magestore/Onestepcheckout/controllers/IndexController.php and add the VAT-ID to the quote. Search for "customize for load country ma khong dien day du thong tin" and append the following code after the existing content:

if(isset($shipping_address_data['vat_id'])) {
    $billingVatId = $shipping_address_data['vat_id'];
}

Lastly, update the segment where field data is set to the quote address. Add the VAT-ID as follows:

$this->getOnepage()->getQuote()->getShippingAddress()
    ->setCountryId($billingCountryId)
    ->setRegionId($billingRegionId)
    ->setPostcode($billingZipcode)
    ->setRegion($billingRegion)
    ->setCity($billingCity)
    ->setVatId($billingVatId)
    ->setCollectShippingRates(true);

OneStepCheckout (The original)

Update 2019-05-10: This fix is now included in the latest version of OneStepCheckout.

To ensure full compatibility with Idev OneStepCheckout, a single line of Idev's code must be modified.

Please open the file at app/code/local/Idev/OneStepCheckout/Model/Observers/PresetDefaults.php. Within this file, you'll need to modify a line at the top. Here's the change you need to make:


// Change from:
//@TODO together with refactoring system.xml: get rid of this variable and add them as config nodes
public $defaultFields = array('country_id', 'region', 'region_id', 'city', 'postcode');

// To:
//@TODO together with refactoring system.xml: get rid of this variable and add them as config nodes
public $defaultFields = array('country_id', 'region', 'region_id', 'city', 'postcode', 'vat_id', 'vat_is_valid', 'vat_request_id', 'vat_request_success', 'vat_request_date', 'vat_trader_name','vat_trader_address');