No tax on SveaWebpay plugin after update

  • Posts: 29
  • Thank you received: 0
7 years 6 months ago #269896

-- 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

Attachments:

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
7 years 6 months ago #269917

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:

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);
			}
to:
if(isset($product->order_product_tax) && $product->order_product_tax > 0) {
				$product_tax = 100 * $product->order_product_tax;
			}
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.

Last edit: 7 years 6 months ago by nicolas.

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

  • Posts: 29
  • Thank you received: 0
7 years 6 months ago #269943

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

Attachments:

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
7 years 6 months ago #269947

Hi,

Ok. I see the problem.
Then please replace that code by:

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;
			}
That should be much better.

The following user(s) said Thank You: Stroppen

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

  • Posts: 29
  • Thank you received: 0
7 years 6 months ago #270037

Hi Nicolas

It worked great, thank you!

Regards,
Henrik

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

Time to create page: 0.044 seconds
Powered by Kunena Forum