[Skip to main content](#vessel-content)

#   First Visit to Check Out - Tax Not Calculated

##

- **[slickgj](/forum/user/829-slickgj "View slickgj's Profile")**
- [![slickgj's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/829-slickgj "View slickgj's Profile") Topic Author
- [ Offline](/forum/user/829-slickgj)

Less More

- Posts: 20
- Thank you received: 0
-
-

15 years 8 months ago [\#7066](#7066) by [slickgj](/forum/user/829-slickgj "View slickgj's Profile")  *[First Visit to Check Out - Tax Not Calculated](/forum/3-bug-report/7066-first-visit-to-check-out-tax-not-calculated#7066 "Hello,  I apologize if this is already addressed in another thread but I searched and did not find it.  It seems that the first visit for a customer in a zone with a tax rule does not include the taxes. The first time a user adds an item to the cart and they are taken to the check-out view, the taxes are not included. if they hit F5 to refresh the view, or add another item to the cart the taxes are then calculated correctly. This also happens if the user logs out before purchase and then logs back in. The first time they click on Proceed To Checkout the taxes will not be calculated properly. Only after they refresh the check out page again does the tax rule take effect. I don't think this is intentional and the taxes should calculate on the first view of the check out.  thoughts?  thanks,  This is with V1.4.4")* was created by *[slickgj](/forum/user/829-slickgj "View slickgj's Profile")*

Hello,

I apologize if this is already addressed in another thread but I searched and did not find it.

It seems that the first visit for a customer in a zone with a tax rule does not include the taxes. The first time a user adds an item to the cart and they are taken to the check-out view, the taxes are not included. if they hit F5 to refresh the view, or add another item to the cart the taxes are then calculated correctly. This also happens if the user logs out before purchase and then logs back in. The first time they click on Proceed To Checkout the taxes will not be calculated properly. Only after they refresh the check out page again does the tax rule take effect. I don't think this is intentional and the taxes should calculate on the first view of the check out.

thoughts?

thanks,

This is with V1.4.4

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDY2LWZpcnN0LXZpc2l0LXRvLWNoZWNrLW91dC10YXgtbm90LWNhbGN1bGF0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86295
- Thank you received: 14273
-
-

15 years 8 months ago [\#7074](#7074) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: First Visit to Check Out - Tax Not Calculated](/forum/3-bug-report/7066-first-visit-to-check-out-tax-not-calculated#7074 "Hello,  I apologize if this is already addressed in another thread but I searched and did not find it.  It seems that the first visit for a customer in a zone with a tax rule does not include the taxes. The first time a user adds an item to the cart and they are taken to the check-out view, the taxes are not included. if they hit F5 to refresh the view, or add another item to the cart the taxes are then calculated correctly. This also happens if the user logs out before purchase and then logs back in. The first time they click on Proceed To Checkout the taxes will not be calculated properly. Only after they refresh the check out page again does the tax rule take effect. I don't think this is intentional and the taxes should calculate on the first view of the check out.  thoughts?  thanks,  This is with V1.4.4")*

Hi,

This is probably related to the way you set tax rules and the main tax zone in the configuration of HikaShop:
The main tax zone is outside the zone where taxes are applied. But when you refresh the page, the zone of the user has been set with his address which overrides the main tax zone and now the tax is calculated.

Could you make a screenshot of your tax rules listing, of the checkout without the taxes applied and the value for the main tax zone ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDY2LWZpcnN0LXZpc2l0LXRvLWNoZWNrLW91dC10YXgtbm90LWNhbGN1bGF0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[slickgj](/forum/user/829-slickgj "View slickgj's Profile")**
- [![slickgj's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/829-slickgj "View slickgj's Profile") Topic Author
- [ Offline](/forum/user/829-slickgj)

Less More

- Posts: 20
- Thank you received: 0
-
-

15 years 8 months ago [\#7272](#7272) by [slickgj](/forum/user/829-slickgj "View slickgj's Profile")  Replied by *[slickgj](/forum/user/829-slickgj "View slickgj's Profile")* on topic *[Re: First Visit to Check Out - Tax Not Calculated](/forum/3-bug-report/7066-first-visit-to-check-out-tax-not-calculated#7272 "Hello,  I apologize if this is already addressed in another thread but I searched and did not find it.  It seems that the first visit for a customer in a zone with a tax rule does not include the taxes. The first time a user adds an item to the cart and they are taken to the check-out view, the taxes are not included. if they hit F5 to refresh the view, or add another item to the cart the taxes are then calculated correctly. This also happens if the user logs out before purchase and then logs back in. The first time they click on Proceed To Checkout the taxes will not be calculated properly. Only after they refresh the check out page again does the tax rule take effect. I don't think this is intentional and the taxes should calculate on the first view of the check out.  thoughts?  thanks,  This is with V1.4.4")*

Hello,

Here are the basics of my setup.

1) I set the main tax zone to Antarctica.
2) I created 1 tax rule for Antarctica with 0% tax.
3) I created 1 additional rule for location X with tax = 13%.

The customer account has address information saved for location X. When the customer is logged in and adds the first item to the cart they are taken to the checkout and the tax is not calculated or included in the total. However, the checkout is showing that the address selected is in location X which should have 13% tax applied. If you refresh the checkout view, or add another item to the cart (causing a return to the checkout) the taxes are now shown correctly.

Why does the first visit to the checkout not display the tax. The customers account is setup for a tax zone and the rule exists. The next step for the customer is to checkout which will take them to paypal (for example). Shouldn't Hikashop, if it is automatically selecting the default customer address, calculated and display taxes based on this default address the first time, and everytime, you are taken to the checkout?

thoughts?

thanks very much,

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDY2LWZpcnN0LXZpc2l0LXRvLWNoZWNrLW91dC10YXgtbm90LWNhbGN1bGF0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86295
- Thank you received: 14273
-
-

15 years 8 months ago [\#7290](#7290) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: First Visit to Check Out - Tax Not Calculated](/forum/3-bug-report/7066-first-visit-to-check-out-tax-not-calculated#7290 "Hello,  I apologize if this is already addressed in another thread but I searched and did not find it.  It seems that the first visit for a customer in a zone with a tax rule does not include the taxes. The first time a user adds an item to the cart and they are taken to the check-out view, the taxes are not included. if they hit F5 to refresh the view, or add another item to the cart the taxes are then calculated correctly. This also happens if the user logs out before purchase and then logs back in. The first time they click on Proceed To Checkout the taxes will not be calculated properly. Only after they refresh the check out page again does the tax rule take effect. I don't think this is intentional and the taxes should calculate on the first view of the check out.  thoughts?  thanks,  This is with V1.4.4")*

We need to have a look at that on our end we might be able to solve the problem.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDY2LWZpcnN0LXZpc2l0LXRvLWNoZWNrLW91dC10YXgtbm90LWNhbGN1bGF0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86295
- Thank you received: 14273
-
-

15 years 8 months ago [\#7359](#7359) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: First Visit to Check Out - Tax Not Calculated](/forum/3-bug-report/7066-first-visit-to-check-out-tax-not-calculated#7359 "Hello,  I apologize if this is already addressed in another thread but I searched and did not find it.  It seems that the first visit for a customer in a zone with a tax rule does not include the taxes. The first time a user adds an item to the cart and they are taken to the check-out view, the taxes are not included. if they hit F5 to refresh the view, or add another item to the cart the taxes are then calculated correctly. This also happens if the user logs out before purchase and then logs back in. The first time they click on Proceed To Checkout the taxes will not be calculated properly. Only after they refresh the check out page again does the tax rule take effect. I don't think this is intentional and the taxes should calculate on the first view of the check out.  thoughts?  thanks,  This is with V1.4.4")*

If you add the line:
$this-&gt;initCart();

after the line:
$this-&gt;cart_update = true;

in the function before_address of the file components/com_hikashop/controllers/checkout.php that should solve the problem.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDY2LWZpcnN0LXZpc2l0LXRvLWNoZWNrLW91dC10YXgtbm90LWNhbGN1bGF0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[slickgj](/forum/user/829-slickgj "View slickgj's Profile")**
- [![slickgj's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/829-slickgj "View slickgj's Profile") Topic Author
- [ Offline](/forum/user/829-slickgj)

Less More

- Posts: 20
- Thank you received: 0
-
-

15 years 8 months ago [\#7405](#7405) by [slickgj](/forum/user/829-slickgj "View slickgj's Profile")  Replied by *[slickgj](/forum/user/829-slickgj "View slickgj's Profile")* on topic *[Re: First Visit to Check Out - Tax Not Calculated](/forum/3-bug-report/7066-first-visit-to-check-out-tax-not-calculated#7405 "Hello,  I apologize if this is already addressed in another thread but I searched and did not find it.  It seems that the first visit for a customer in a zone with a tax rule does not include the taxes. The first time a user adds an item to the cart and they are taken to the check-out view, the taxes are not included. if they hit F5 to refresh the view, or add another item to the cart the taxes are then calculated correctly. This also happens if the user logs out before purchase and then logs back in. The first time they click on Proceed To Checkout the taxes will not be calculated properly. Only after they refresh the check out page again does the tax rule take effect. I don't think this is intentional and the taxes should calculate on the first view of the check out.  thoughts?  thanks,  This is with V1.4.4")*

in Version 1.4.4 of checkout.php the line "$this-&gt;cart_update = true;" is not in the function before_address.

I did find it in functions: after_coupon and after_cart

What modification should I make?

thanks,

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDY2LWZpcnN0LXZpc2l0LXRvLWNoZWNrLW91dC10YXgtbm90LWNhbGN1bGF0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86295
- Thank you received: 14273
-
-

15 years 8 months ago -  15 years 8 months ago [\#7406](#7406) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: First Visit to Check Out - Tax Not Calculated](/forum/3-bug-report/7066-first-visit-to-check-out-tax-not-calculated#7406 "Hello,  I apologize if this is already addressed in another thread but I searched and did not find it.  It seems that the first visit for a customer in a zone with a tax rule does not include the taxes. The first time a user adds an item to the cart and they are taken to the check-out view, the taxes are not included. if they hit F5 to refresh the view, or add another item to the cart the taxes are then calculated correctly. This also happens if the user logs out before purchase and then logs back in. The first time they click on Proceed To Checkout the taxes will not be calculated properly. Only after they refresh the check out page again does the tax rule take effect. I don't think this is intentional and the taxes should calculate on the first view of the check out.  thoughts?  thanks,  This is with V1.4.4")*

The function needs to be like that: Code:

function before_address(){ $status = $this-&gt;_checkLogin(); if($status){ $user_id = hikashop::loadUser(); if($user_id){ $app =&amp; JFactory::getApplication(); $shipping = $app-&gt;getUserState( HIKASHOP_COMPONENT.'.shipping_address',0 ); if(empty($shipping)){ $db =&amp; JFactory::getDBO(); $db-&gt;setQuery('SELECT address_id FROM '.hikashop::table('address').' WHERE address_published=1 AND address_user_id='.$user_id); $address_id = $db-&gt;loadResult(); $app-&gt;setUserState( HIKASHOP_COMPONENT.'.shipping_address',$address_id ); $app-&gt;setUserState( HIKASHOP_COMPONENT.'.billing_address',$address_id ); if(strpos($this-&gt;checkout_workflow,'shipping')!==false){ //try to auto select the shipping. If the shipping was selected and that the shipping is on the same step as the previous page, stay on the same page if(!$this-&gt;before_shipping(true) &amp;&amp; $this-&gt;_getStep('shipping',$this-&gt;previous)!==false){ $status = false; } } if(strpos($this-&gt;checkout_workflow,'payment')!==false){ //try to auto select the payment. If the payment was selected and that the payment is on the same step as the previous page, stay on the same page if(!$this-&gt;before_payment(true) &amp;&amp; $this-&gt;_getStep('payment',$this-&gt;previous)!==false){ $status = false; } } $this-&gt;initCart(true); $this-&gt;cart_update = true; $this-&gt;initCart(); } } } }

Last edit: 15 years 8 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDY2LWZpcnN0LXZpc2l0LXRvLWNoZWNrLW91dC10YXgtbm90LWNhbGN1bGF0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[slickgj](/forum/user/829-slickgj "View slickgj's Profile")**
- [![slickgj's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/829-slickgj "View slickgj's Profile") Topic Author
- [ Offline](/forum/user/829-slickgj)

Less More

- Posts: 20
- Thank you received: 0
-
-

15 years 8 months ago -  15 years 8 months ago [\#7409](#7409) by [slickgj](/forum/user/829-slickgj "View slickgj's Profile")  Replied by *[slickgj](/forum/user/829-slickgj "View slickgj's Profile")* on topic *[Re: First Visit to Check Out - Tax Not Calculated](/forum/3-bug-report/7066-first-visit-to-check-out-tax-not-calculated#7409 "Hello,  I apologize if this is already addressed in another thread but I searched and did not find it.  It seems that the first visit for a customer in a zone with a tax rule does not include the taxes. The first time a user adds an item to the cart and they are taken to the check-out view, the taxes are not included. if they hit F5 to refresh the view, or add another item to the cart the taxes are then calculated correctly. This also happens if the user logs out before purchase and then logs back in. The first time they click on Proceed To Checkout the taxes will not be calculated properly. Only after they refresh the check out page again does the tax rule take effect. I don't think this is intentional and the taxes should calculate on the first view of the check out.  thoughts?  thanks,  This is with V1.4.4")*

Thanks for your help,

That seems to have addressed the issue from my initial testing.

Will this update become standard in future releases or do we need to make note of this and apply this change in future revisions?

Last edit: 15 years 8 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile"). Reason: remove code and update original

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDY2LWZpcnN0LXZpc2l0LXRvLWNoZWNrLW91dC10YXgtbm90LWNhbGN1bGF0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86295
- Thank you received: 14273
-
-

15 years 8 months ago [\#7413](#7413) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: First Visit to Check Out - Tax Not Calculated](/forum/3-bug-report/7066-first-visit-to-check-out-tax-not-calculated#7413 "Hello,  I apologize if this is already addressed in another thread but I searched and did not find it.  It seems that the first visit for a customer in a zone with a tax rule does not include the taxes. The first time a user adds an item to the cart and they are taken to the check-out view, the taxes are not included. if they hit F5 to refresh the view, or add another item to the cart the taxes are then calculated correctly. This also happens if the user logs out before purchase and then logs back in. The first time they click on Proceed To Checkout the taxes will not be calculated properly. Only after they refresh the check out page again does the tax rule take effect. I don't think this is intentional and the taxes should calculate on the first view of the check out.  thoughts?  thanks,  This is with V1.4.4")*

Yes, that's the code of the function which will be in next release.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDY2LWZpcnN0LXZpc2l0LXRvLWNoZWNrLW91dC10YXgtbm90LWNhbGN1bGF0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.129 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
