Re: TaxJar Issue - Composer Related?
We just need to determine why MODULE_ORDER_TOTAL_TAXJAR_SORT_ORDER is not getting set. It could just need to be configured:
Log in to your store's Admin. Go to Modules/Order Total/TaxJar Sales Tax. On the right side of the page, look for Sort Order. Make sure there is a number there. If not, click edit and put a number in that box.
Re: TaxJar Issue - Composer Related?
ok thx.
It was/is set to 400.
I rolled back my changes.
Re: TaxJar Issue - Composer Related?
Is the error appearing when you visit Checkout Payment?
Are you using standard checkout or OPC?
Re: TaxJar Issue - Composer Related?
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.
Re: TaxJar Issue - Composer Related?
Quote:
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.
Re: TaxJar Issue - Composer Related?
That's good. If you're seeing values back from taxjar, your composer issue is solved. I wouldn't worry about that.
It takes a good while to see the transactions in taxjar.
Sounds like everything is working, other than you are getting a PHP warning.
Re: TaxJar Issue - Composer Related?
thank u both.
I added the carlwhat code and I'll keep an eye on the php warnings.
hope ur right chuckphillips. I feel like I have a one-way relationship with taxjar right now.
Don't know how long it takes for transaction data to populate on their end.
I can already see that getting an email response from them is going a test of patience.
Re: TaxJar Issue - Composer Related?
carlwhat, got a ?
what is the purpose of the first of these lines? I don't understand.
$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;
Re: TaxJar Issue - Composer Related?
Quote:
Originally Posted by
fravac
carlwhat, got a ?
what is the purpose of the first of these lines? I don't understand.
$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;
the first line should be removed (as you did in post #10 above).
my mistake.
best.
Re: TaxJar Issue - Composer Related?
thx carlwhat
so far so good
had a few transactions go thru without any php warnings since code change