Problem
There is a bug in Magento that prevents Zip+4 tax codes from accurately being calculated. If a customer enters their zip code during Magento checkout in the Zip+4 format (XXXXX-XXXX) or makes a typo during entry, i.e. includes an extra or non-digit character, any applicable taxes are not calculated by Magento. This causes headaches for orders where tax should have been collected: following up with customers, running additional charges, and keeping track of these manual tax collections is an inconvenience for business owners and customers alike.
Since the solution to this problem is not well-documented by the Magento community, we have posted it below for others to refer to. Plus note that the instructions are for Magento 1.7.x (see the bottom of the post for info about applying this fix in Magento 1.4.x):
Solution
To fix the Magento Zip+4 tax calculation problem please take the follow steps:
Fixing the Zip+4 Tax Calculation Issue in Magento 1.4x
The file structure in Magento 1.4.x differs from 1.7.x, so for the above steps you will need to:
There is a bug in Magento that prevents Zip+4 tax codes from accurately being calculated. If a customer enters their zip code during Magento checkout in the Zip+4 format (XXXXX-XXXX) or makes a typo during entry, i.e. includes an extra or non-digit character, any applicable taxes are not calculated by Magento. This causes headaches for orders where tax should have been collected: following up with customers, running additional charges, and keeping track of these manual tax collections is an inconvenience for business owners and customers alike.
Since the solution to this problem is not well-documented by the Magento community, we have posted it below for others to refer to. Plus note that the instructions are for Magento 1.7.x (see the bottom of the post for info about applying this fix in Magento 1.4.x):
Solution
To fix the Magento Zip+4 tax calculation problem please take the follow steps:
- Access the site via an FTP Client
- Download app/code/core/Mage/Tax/Model/Resource/Calculation.php
- Create a new folder in the local section (this will preserve the fix during Magento upgrades): app/code/local/Mage/Tax/Model/Resource/
- Find the following code in Calculation.php (it should be around line 235):
1.
$postcode
=
$request
->getPostcode();
1.
$postcode
=
substr
(
$request
->getPostcode(),0,5);
- Save Calculation.php and upload it to the new folder created in Step 3 app/code/local/Mage/Tax/Model/Resource/
Fixing the Zip+4 Tax Calculation Issue in Magento 1.4x
The file structure in Magento 1.4.x differs from 1.7.x, so for the above steps you will need to:
- Locate Calculation.php in /app/code/core/Mage/Tax/Model/Mysql4
- Replace the /Resource/ directory with the /Mysql14/ directory
No comments:
Post a Comment