
Originally Posted by
fravac
Having all kinds of issues. None of them are due to your code.
Think it's all composer related because I stink.
I'm seeing sales tax in the cart, invoice and when I log into paypal to verify it was charged (use them for onsite processing (WPP)).
Not seeing either of my test transactions in TaxJar site yet.
Copied vendor file into taxjar manually. Maybe that's a problem?
Not sure which composer.json to edit but guessing I need to something to require taxjar ^2.0??
Regarding Warning Message:
This is the current error from last 2 customers transactions who didn't need to pay tax
#1 sizeof() called at [/home/xxxxxxxxxx/public_html/includes/classes/order_total.php:66]
#2 order_total->process() called at [/home/xxxxxxxxxx/public_html/includes/modules/checkout_process.php:83]
#3 require(/home/xxxxxxxxxx/public_html/includes/modules/checkout_process.php) called at [/home/xxxxxxxxxx/public_html/includes/modules/pages/checkout_process/header_php.php:14]
#4 require(/home/xxxxxxxxxx/public_html/includes/modules/pages/checkout_process/header_php.php) called at [/home/xxxxxxxxxx/public_html/index.php:35]
--> PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/xxxxxxxxxx/public_html/includes/classes/order_total.php on line 66.
Not getting the other message at the moment. Guessing I did something while all out of sorts.
Feel like i'm close but not so much.
i think your original changes were fine. that error was coming up only prior to taxjar being installed. once installed and the config values are entered into the database, the error disappears. i would think chuck phillips (if he is still maintaining the code) should address that.
i think the 2nd error, if i understand it correctly is only happening when someone has an order that is not taxable. if so, i would change the __construct method of includes/modules/order_total/ot_taxjar.php as so:
PHP Code:
function __construct()
{
$this->code = 'ot_taxjar';
$this->title = MODULE_ORDER_TOTAL_TAXJAR_TITLE;
$this->description = MODULE_ORDER_TOTAL_TAXJAR_DESCRIPTION;
$this->sort_order = MODULE_ORDER_TOTAL_TAXJAR_SORT_ORDER;
$this->sort_order = defined('MODULE_ORDER_TOTAL_TAXJAR_SORT_ORDER') ? MODULE_ORDER_TOTAL_TAXJAR_SORT_ORDER : null;
if (null === $this->sort_order) return false;
$this->output = [];
}
i do not use this plugin, so pure guesses.
hope it helps.
best.
Bookmarks