- Posts: 29
- Thank you received: 0
No tax on SveaWebpay plugin after update
9 years 4 months ago #269896
by Stroppen
No tax on SveaWebpay plugin after update was created by Stroppen
-- url of the page with the problem -- :
www.belysningsimporten.se
-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.7.0
-- PHP version -- : 7.0.18
Hello
After updating to 3.0.1, the VAT for the products will not be sent to Svea, it will be displayed correctly with VAT at checkout and backend in hikashop, but not at Svea webpay.
Has anything been changed, any setting you need to do after the update?
Regards
Henrik
-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.7.0
-- PHP version -- : 7.0.18
Hello
After updating to 3.0.1, the VAT for the products will not be sent to Svea, it will be displayed correctly with VAT at checkout and backend in hikashop, but not at Svea webpay.
Has anything been changed, any setting you need to do after the update?
Regards
Henrik
Please Log in or Create an account to join the conversation.
9 years 4 months ago - 9 years 4 months ago #269917
by nicolas
Replied by nicolas on topic No tax on SveaWebpay plugin after update
Hi,
I4ve checked the code of the plugin and as it was developed by a sub contractor, they didn't use the standard way we do in other payment plugins to send the taxes.
Try changing the code:
to:
in the file plugins/hikashoppayment/sveawebpay/sveawebpay.php
That should hopefully solve the problem.
Let us know how it goes so that we can include the patch for the next version.
I4ve checked the code of the plugin and as it was developed by a sub contractor, they didn't use the standard way we do in other payment plugins to send the taxes.
Try changing the code:
Code:
if(isset($product->order_product_tax_info[0]->tax_rate) && $product->order_product_tax_info[0]->tax_rate > 0) {
$product_tax = 100 * ($product->order_product_tax_info[0]->tax_rate);
}
Code:
if(isset($product->order_product_tax) && $product->order_product_tax > 0) {
$product_tax = 100 * $product->order_product_tax;
}
That should hopefully solve the problem.
Let us know how it goes so that we can include the patch for the next version.
Last edit: 9 years 4 months ago by nicolas.
Please Log in or Create an account to join the conversation.
9 years 4 months ago #269943
by Stroppen
Replied by Stroppen on topic No tax on SveaWebpay plugin after update
Hi Nicolas
I have now tried to replace the code but unfortunately did not work.
As you can see in the pictures, the sum sent to Svea is now much larger than the order value.
Regards
Henrik
I have now tried to replace the code but unfortunately did not work.
As you can see in the pictures, the sum sent to Svea is now much larger than the order value.
Regards
Henrik
Please Log in or Create an account to join the conversation.
9 years 4 months ago #269947
by nicolas
Replied by nicolas on topic No tax on SveaWebpay plugin after update
Hi,
Ok. I see the problem.
Then please replace that code by:
That should be much better.
Ok. I see the problem.
Then please replace that code by:
Code:
if(isset($product->order_product_tax_info)) {
$tax = reset($product->order_product_tax_info);
if($tax->tax_rate > 0)
$product_tax = 100 * $tax->tax_rate;
}
The following user(s) said Thank You: Stroppen
Please Log in or Create an account to join the conversation.
9 years 4 months ago #270037
by Stroppen
Replied by Stroppen on topic No tax on SveaWebpay plugin after update
Hi Nicolas
It worked great, thank you!
Regards,
Henrik
It worked great, thank you!
Regards,
Henrik
Please Log in or Create an account to join the conversation.
Time to create page: 0.195 seconds