Is it possible to use the lowest tax rate for the shipping tax?
- nico.van.leeuwen
-
Topic Author
- Offline
Less
More
4 years 2 weeks ago - 4 years 2 weeks ago #344851
by nico.van.leeuwen
-- HikaShop version -- : 4.6.1
-- Joomla version -- : 4.2.2
-- PHP version -- : 8.1.10
Hi, in the shipping settings there is an option to use the highest rate of the order as tax on the shipping costs.
Is there a possibility to use the lowest rate of products in the order?
And would it be possible to show that amount of tax on the shipping costs somewhere?
Thank you very much.
-- Joomla version -- : 4.2.2
-- PHP version -- : 8.1.10
Hi, in the shipping settings there is an option to use the highest rate of the order as tax on the shipping costs.
Is there a possibility to use the lowest rate of products in the order?
And would it be possible to show that amount of tax on the shipping costs somewhere?
Thank you very much.
Last edit: 4 years 2 weeks ago by nico.van.leeuwen. Reason: solved
Please Log in or Create an account to join the conversation.
4 years 2 weeks ago #344853
by nicolas
Replied by nicolas on topic Is it possible to use the lowest tax rate for the shipping tax?
Hi,
We can add that option for the next version of HikaShop.
To display the amount of tax on the shipping costs on the checkout, you can edit the file show_block_shipping via the menu Display>Views and add the code:
after the line:
We can add that option for the next version of HikaShop.
To display the amount of tax on the shipping costs on the checkout, you can edit the file show_block_shipping via the menu Display>Views and add the code:
Code:
$this->currencyClass = hikashop_get('class.currency');
echo '('.$this->currencyClass->format($shipping->shipping_price_with_tax-$shipping->shipping_price,hikashop_getCurrency()).')';
Code:
echo $this->checkoutHelper->getDisplayPrice($shipping, 'shipping', $this->options);
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
4 years 2 weeks ago #344881
by nico.van.leeuwen
Replied by nico.van.leeuwen on topic Is it possible to use the lowest tax rate for the shipping tax?
Hi Nicolas,
Thank you for making that possible in the next version.
The change in the view gives met a critical error when viewing the cart :
CRITICAL 81.207.92.120 error Uncaught Throwable of type Error thrown with message "Call to a member function format() on null". Stack trace: #0 [ROOT]/libraries/src/MVC/View/HtmlView.php(410): include()
#1 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2726): Joomla\CMS\MVC\View\HtmlView->loadTemplate()
#2 [ROOT]/components/com_hikashop/views/checkout/view.html.php(364): hikashopView->loadTemplate()
#3 [ROOT]/templates/yootheme/html/com_hikashop/checkout/show_block_cart.php(355): CheckoutViewCheckout->getDisplayProductPrice()
#4 [ROOT]/libraries/src/MVC/View/HtmlView.php(410): include('/home/swanndev/...')
#5 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2726): Joomla\CMS\MVC\View\HtmlView->loadTemplate()
#6 [ROOT]/components/com_hikashop/views/checkout/view.html.php(282): hikashopView->loadTemplate()
#7 [ROOT]/components/com_hikashop/views/checkout[TMP]l/show.php(42): CheckoutViewCheckout->displayBlock()
#8 [ROOT]/libraries/src/MVC/View/HtmlView.php(410): include('/home/swanndev/...')
#9 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2726): Joomla\CMS\MVC\View\HtmlView->loadTemplate()
#10 [ROOT]/libraries/src/MVC/View/HtmlView.php(203): hikashopView->loadTemplate()
#11 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2681): Joomla\CMS\MVC\View\HtmlView->display()
#12 [ROOT]/components/com_hikashop/views/checkout/view.html.php(53): hikashopView->display()
#13 [ROOT]/libraries/src/MVC/Controller/BaseController.php(639): CheckoutViewCheckout->display()
#14 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2404): Joomla\CMS\MVC\Controller\BaseController->display()
#15 [ROOT]/components/com_hikashop/controllers/checkout.php(65): hikashopController->display()
#16 [ROOT]/components/com_hikashop/controllers/checkout.php(228): checkoutController->display()
#17 [ROOT]/components/com_hikashop/controllers/checkout.php(81): checkoutController->show()
#18 [ROOT]/libraries/src/MVC/Controller/BaseController.php(672): checkoutController->step()
#19 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2382): Joomla\CMS\MVC\Controller\BaseController->execute()
#20 [ROOT]/components/com_hikashop/hikashop.php(88): hikashopController->execute()
#21 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('/home/swanndev/...')
#22 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()
#23 [ROOT]/libraries/src/Component/ComponentHelper.php(355): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#24 [ROOT]/libraries/src/Application/SiteApplication.php(200): Joomla\CMS\Component\ComponentHelper::renderComponent()
#25 [ROOT]/libraries/src/Application/SiteApplication.php(241): Joomla\CMS\Application\SiteApplication->dispatch()
#26 [ROOT]/libraries/src/Application/CMSApplication.php(294): Joomla\CMS\Application\SiteApplication->doExecute()
#27 [ROOT]/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute()
Not sure why this is but you can probably see why
Thank you for making that possible in the next version.
The change in the view gives met a critical error when viewing the cart :
CRITICAL 81.207.92.120 error Uncaught Throwable of type Error thrown with message "Call to a member function format() on null". Stack trace: #0 [ROOT]/libraries/src/MVC/View/HtmlView.php(410): include()
#1 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2726): Joomla\CMS\MVC\View\HtmlView->loadTemplate()
#2 [ROOT]/components/com_hikashop/views/checkout/view.html.php(364): hikashopView->loadTemplate()
#3 [ROOT]/templates/yootheme/html/com_hikashop/checkout/show_block_cart.php(355): CheckoutViewCheckout->getDisplayProductPrice()
#4 [ROOT]/libraries/src/MVC/View/HtmlView.php(410): include('/home/swanndev/...')
#5 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2726): Joomla\CMS\MVC\View\HtmlView->loadTemplate()
#6 [ROOT]/components/com_hikashop/views/checkout/view.html.php(282): hikashopView->loadTemplate()
#7 [ROOT]/components/com_hikashop/views/checkout[TMP]l/show.php(42): CheckoutViewCheckout->displayBlock()
#8 [ROOT]/libraries/src/MVC/View/HtmlView.php(410): include('/home/swanndev/...')
#9 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2726): Joomla\CMS\MVC\View\HtmlView->loadTemplate()
#10 [ROOT]/libraries/src/MVC/View/HtmlView.php(203): hikashopView->loadTemplate()
#11 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2681): Joomla\CMS\MVC\View\HtmlView->display()
#12 [ROOT]/components/com_hikashop/views/checkout/view.html.php(53): hikashopView->display()
#13 [ROOT]/libraries/src/MVC/Controller/BaseController.php(639): CheckoutViewCheckout->display()
#14 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2404): Joomla\CMS\MVC\Controller\BaseController->display()
#15 [ROOT]/components/com_hikashop/controllers/checkout.php(65): hikashopController->display()
#16 [ROOT]/components/com_hikashop/controllers/checkout.php(228): checkoutController->display()
#17 [ROOT]/components/com_hikashop/controllers/checkout.php(81): checkoutController->show()
#18 [ROOT]/libraries/src/MVC/Controller/BaseController.php(672): checkoutController->step()
#19 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2382): Joomla\CMS\MVC\Controller\BaseController->execute()
#20 [ROOT]/components/com_hikashop/hikashop.php(88): hikashopController->execute()
#21 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('/home/swanndev/...')
#22 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()
#23 [ROOT]/libraries/src/Component/ComponentHelper.php(355): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#24 [ROOT]/libraries/src/Application/SiteApplication.php(200): Joomla\CMS\Component\ComponentHelper::renderComponent()
#25 [ROOT]/libraries/src/Application/SiteApplication.php(241): Joomla\CMS\Application\SiteApplication->dispatch()
#26 [ROOT]/libraries/src/Application/CMSApplication.php(294): Joomla\CMS\Application\SiteApplication->doExecute()
#27 [ROOT]/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute()
Not sure why this is but you can probably see why
Please Log in or Create an account to join the conversation.
4 years 2 weeks ago #344884
by nicolas
Replied by nicolas on topic Is it possible to use the lowest tax rate for the shipping tax?
Hi,
Not sure why either. My code shouldn't be able to output that error message. It looks like you made a typo. Could you double check the modification ?
Not sure why either. My code shouldn't be able to output that error message. It looks like you made a typo. Could you double check the modification ?
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
4 years 2 weeks ago #344953
by nico.van.leeuwen
Replied by nico.van.leeuwen on topic Is it possible to use the lowest tax rate for the shipping tax?
Hi Nicolas,
A collegue pointed to something and remove the $this part and now it's working.
Thanks !
A collegue pointed to something and remove the $this part and now it's working.
Thanks !
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
4 years 1 day ago - 4 years 1 day ago #345350
by nico.van.leeuwen
Replied by nico.van.leeuwen on topic Is it possible to use the lowest tax rate for the shipping tax?
Hi, after using this we noticed that the displayed tax amount was wrong.
We had 3 shipping methods that were offered in our example :
So I'm a bit confused on why that is and more important how to fix / change this behaviour.
We use only manual shipping and I would assume that the cheapest option would be selected first but it's the one that has a zone assigned.
Is this by design? And could it be changed in any way? (not a priority, just nice if this would be possible).
Thanks again for the feature in 4.6.2
(after some more testing it looks like it's taking the tax of the last shipping method).
We had 3 shipping methods that were offered in our example :
- pickup (free)
- normal shipping price € 1,21 with tax where 0,21 is the tax amount
- other shipping option € 36,97 with tax where € 6,42 is the tax amount
So I'm a bit confused on why that is and more important how to fix / change this behaviour.
We use only manual shipping and I would assume that the cheapest option would be selected first but it's the one that has a zone assigned.
Is this by design? And could it be changed in any way? (not a priority, just nice if this would be possible).
Thanks again for the feature in 4.6.2
(after some more testing it looks like it's taking the tax of the last shipping method).
Last edit: 4 years 1 day ago by nico.van.leeuwen. Reason: extra test
Please Log in or Create an account to join the conversation.
4 years 1 day ago #345360
by nicolas
Replied by nicolas on topic Is it possible to use the lowest tax rate for the shipping tax?
Hi,
Could you provide :
- the url of the shop
- instructions to reproduce the problem
- screenshot of the settings of the shipping methods
so that we can reproduce the issue and understand the situation ?
Could you provide :
- the url of the shop
- instructions to reproduce the problem
- screenshot of the settings of the shipping methods
so that we can reproduce the issue and understand the situation ?
Please Log in or Create an account to join the conversation.
3 years 11 months ago #345500
by nicolas
Replied by nicolas on topic Is it possible to use the lowest tax rate for the shipping tax?
Hi,
We got your backend access and were able to login.
I see the tax issue with that one product. I tried to reproduce the issue with the same settings on my end but I didn't get the problem.
Could you also provide a FTP access in order to debug the situation ?
We got your backend access and were able to login.
I see the tax issue with that one product. I tried to reproduce the issue with the same settings on my end but I didn't get the problem.
Could you also provide a FTP access in order to debug the situation ?
Please Log in or Create an account to join the conversation.
3 years 11 months ago #345579
by Philip
Replied by Philip on topic Is it possible to use the lowest tax rate for the shipping tax?
Hello nico.van.leeuwen,
As previously requested by Nicolas without providing FTP access we won't be able to progress on your subject.
Awaiting your elements.
Regards
As previously requested by Nicolas without providing FTP access we won't be able to progress on your subject.
Awaiting your elements.
Regards
The following user(s) said Thank You: nico.van.leeuwen
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
3 years 11 months ago #345602
by nico.van.leeuwen
Replied by nico.van.leeuwen on topic Is it possible to use the lowest tax rate for the shipping tax?
Hi Philip,
Sure no problem.
I will send it to support like I did with the account.
Sorry I respond so late but I did not get a notification of you update for some reason.
Sure no problem.
I will send it to support like I did with the account.
Sorry I respond so late but I did not get a notification of you update for some reason.
Please Log in or Create an account to join the conversation.
3 years 11 months ago #345611
by nicolas
Replied by nicolas on topic Is it possible to use the lowest tax rate for the shipping tax?
Hi,
Thank you for the FTP access.
I found the issue and made a patch for it. It's now working on your website (note that you need to logout/login to see the change on the frontend).
We've also included the patch in HikaShop's install package so for anyone else reading this, if you have the 4.6.2 or earlier and the same issue, download again the install package on our website and install it on yours to get the patch.
Thank you for the FTP access.
I found the issue and made a patch for it. It's now working on your website (note that you need to logout/login to see the change on the frontend).
We've also included the patch in HikaShop's install package so for anyone else reading this, if you have the 4.6.2 or earlier and the same issue, download again the install package on our website and install it on yours to get the patch.
The following user(s) said Thank You: nico.van.leeuwen
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
3 years 11 months ago #345618
by nico.van.leeuwen
Replied by nico.van.leeuwen on topic Is it possible to use the lowest tax rate for the shipping tax?
Hi, thanks for the fabulous support in fixing this.
I've tested and it all seems correct now.
I've tested and it all seems correct now.
Please Log in or Create an account to join the conversation.
Time to create page: 0.269 seconds