Shipstation Plugin not transferring Tax

  • Posts: 303
  • Thank you received: 18
5 years 11 months ago #301087

-- HikaShop version -- : 3.5.0
-- Joomla version -- : 3.8.13

I successfully setup the ShipStation plugin with our shipstation account. However, after a few test orders, i noticed that shipstation isn't showing the tax, but rather the order totals. Is there any way to split this out when they show up in ShipStation?

For this test case, the product was $0.50 and tax is 9.99%, so order total is $0.55. In shipstation it shows $0.00 for tax and $0.00 for product total.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
5 years 11 months ago #301102

Hello,

Thanks for your return ! It seems that ShipStation continue to improve itself, by the past these kind of data wasn't managed.
I add this new data processing around tax, do you agree to process some test to check this new version (in attachments with this message).
We are expecting returns from you before updates our Shipstation package file.

Regards

Attachments:
Last edit: 5 years 11 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 303
  • Thank you received: 18
5 years 11 months ago #301145

That broke the integration between hikashop and shipstation. Shipstation not updating now.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 303
  • Thank you received: 18
5 years 11 months ago #301148

Also, I wanted to report that the "order number" that is reported inside ShipStation does not match the order number in Hikashop and is very confusing. Is there any way to fix that as well?



I believe it is importing the "Order_id" instead of order number. Maybe this should be an option inside the plugin?

Attachments:
Last edit: 5 years 11 months ago by mojooutdoors-holden. Reason: added additional screenshot and explanation

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
5 years 11 months ago #301194

Hello,

With this message, you will find the same update version but with some correction inside the XML, I had made a little mistake.
I tested myself this version and it seems that it work but I waiting news from you.

Second step, unfortunately I won't be able to satisfy your request, to explain you why, it's because we switch order id and order number.
<Order>
<OrderID>' . $order->order_number . '</OrderID>
<OrderNumber>' . (int)$order->order_id . '</OrderNumber>
...

because when Shipstation update your order on your website, the notification will only contain the OrderNumber
<OrderNumber>' . (int)$order->order_id . '</OrderNumber>

And HikaShop works for security question with the order id.
Sorry for this return.

Regards

Attachments:
Last edit: 5 years 11 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 303
  • Thank you received: 18
5 years 11 months ago #301206

I will test the tax change this evening and report back.

As for the other question:

So is the problem with how ShipStation configured their end?

It seems obvious that we could change it on our end, but it sounds like the return from ShipStation is the problem. They return "order_id" by default? There's no way to change this on their end? The order_id is not very useful in the current hikashop setup which uses order_number and invoice_number primarily.

Please Log in or Create an account to join the conversation.

  • Posts: 303
  • Thank you received: 18
5 years 11 months ago #301207

According to their Custom Store config page, it seems you can use Order_number or Order_ID?
https://help.shipstation.com/hc/en-us/articles/205928478-ShipStation-Custom-Store-Development-Guide

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
5 years 11 months ago #301226

Hello,

Yes, BUT when your website received a notification from Shipstation, you have only this :

https://www.yourstore.com/shipstationxml.php?action=shipnotify&order_number=ABC123&carrier=USPS&service=&tracking_number=9511343223432432432

In this notification there isn't the <OrderID> given previously when the order is created on Shipstation servers AND as I tell you HikaShop required the order_id, that's why we had to switch in order to get the order id when ShipStation notify your HikaShop.
Hope this is more clear.

Regards

Last edit: 5 years 11 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 303
  • Thank you received: 18
5 years 11 months ago #301256

Is there any way you can add a custom field to the ShipStation order import? On the custom store development page, it states you can add up to 3 custom fields. Maybe make these options in the plugin?

For example, i can make CustomField1=order_id and display the custom field in ShipStation. This would satisfy my purposes of locating orders on both sides.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
5 years 11 months ago #301276

Hello,

Right, among all upgrade I process, I can add a custom field, from this tutorial it seems that you will find this custom field with order notes, and so this won't correct the fact that the ShipStation OrderNumber will always be the order id... Because this custom field won't be in Shipstation url notification.

And so I don't know if that can fit your needs, but anyway I don't have in mind to add it to pour plugin, so this will just be a little "add" just for you.
You find this in the other thread with your new ShipStation plugin version.
Regards

Please Log in or Create an account to join the conversation.

  • Posts: 303
  • Thank you received: 18
5 years 11 months ago #301786

Tax import into shipstation is still broken. Currently, it shows the correct tax, but the unit price = unit price + tax (see screenshot).



In that screenshot, the unit price should be $89.99 and tax is 10.44% or $9.39 in this case.

Therefore product total should be $89.99, tax should be $9.39 and Total Order/Total Paid should be $99.39.

Attachments:
Last edit: 5 years 11 months ago by mojooutdoors-holden.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
5 years 11 months ago #301808

Hello,

I understand, by adding tax management as a new line, I will have to modify the unit price, and more precisely remove the tax in the unit price.
Can you try to just modify the unit price, because I don't know how Shipstation manage these 2 data Total Order/Total Paid.

For this follow me step by step :
- Open your file "shipstation.php" in YourWebsite\plugins\system\shipstation folder
- Around line 340, look for this :



Modify : <UnitPrice>' . round( ($product->order_product_price + $product->order_product_tax), 2) . '</UnitPrice>
To get this : <UnitPrice>' . round($product->order_product_price, 2) . '</UnitPrice>

Awaiting news from you.
Regards

Last edit: 5 years 11 months ago by Philip.
The following user(s) said Thank You: mojooutdoors-holden

Please Log in or Create an account to join the conversation.

  • Posts: 303
  • Thank you received: 18
5 years 11 months ago #301908

That worked perfectly! Might want to put that change into the official release of the plugin! Thanks Philip!

The following user(s) said Thank You: Philip

Please Log in or Create an account to join the conversation.

  • Posts: 303
  • Thank you received: 18
5 years 9 months ago #302986

Philip,

There still seems to be an issue with the Tax and ShipStation. Currently, it sends the tax to shipstation on a per unit basis. For example, if i have 3 x the same item, it only shows tax for one of the items.

Screenshot of what I'm talking about:





Let me know if I need to elaborate more.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
5 years 9 months ago #303006

Hello,

Can you try this :



Around line 347, you have this : $product_tax = (float)$product->order_product_tax; change it for this :
$product_tax = (float)$product->order_product_tax * (int)$product->order_product_quantity;

And make a return to see if that leads to more accurate results ?

Regards

Last edit: 5 years 9 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 303
  • Thank you received: 18
5 years 9 months ago #303507

Now it is only calculating the total tax for one product. I have 3 units of one product and resulting tax is $2.31 (correct) but it doesn't show the tax of the other item in the order.



I would've thought there would be a simple call to the total tax within hikashop? For example, the order page on hikashop backend shows the total tax for an order?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
5 years 9 months ago #303525

Hello,

Yes, right, sorry I just forgot one detail, see my code :
- Before around line 347 :
$product_tax = (float)$product->order_product_tax * (int)$product->order_product_quantity;

- Add a "+" to have this :
$product_tax += (float)$product->order_product_tax * (int)$product->order_product_quantity;


Sorry for this mistake, but as I process my test with only 1 product in order I didn't realize...
Regards

Last edit: 5 years 9 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 303
  • Thank you received: 18
5 years 9 months ago #303630

Looks like that finally worked! Thanks Philip!

The following user(s) said Thank You: Philip

Please Log in or Create an account to join the conversation.

Time to create page: 0.134 seconds
Powered by Kunena Forum