
Originally Posted by
LadyHLG
Tesla,
I haven't had time to test this, but you can give it a try.
Open the following file:
includes\modules\order_total\ot_local_sales_taxes.php
at about line 170 look for the following:
$debug2 .= $myfield."<br>";
right
above that line place the following code:
PHP Code:
if($taxmatch == "postcode"){
$myfield = substr($myfield, 0, 5);
}
See if it does the trick.
LadyHLG
I have the exact same issue now. If the customer uses 9-digit zipcode, his order will be "tax free". Plug-in version 2.5.3a. "$debug2" or "$myfield" are not existed any more. Here is how I changed my code, which is similar to the guide above.
At around line 86. Change the following code in includes\modules\order_total\ot_local_sales_taxes.php
Code:
$apply_local_tax = check_for_datamach($taxrec['order_data'], $taxrec['matching_data']);
To the following
Code:
$apply_local_tax = check_for_datamach(substr($taxrec['order_data'], 0, 5), $taxrec['matching_data']);
I tried it on my end (zc 1.57c, php7.4) and it seems to work good.
Keywords for search: 9-digit, 9 digits, nine digits
Bookmarks