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

#   import mass actions the TAX change

##

- **[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")**
- [![mariussport's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/car.gif)](/forum/user/9713-mariussport "View mariussport's Profile") Topic Author
- [ Offline](/forum/user/9713-mariussport)
- Test fase

Less More

- Posts: 122
- Thank you received: 3
-
-
-
- [](http://bal.mariusklabbers.nl)
-

7 years 1 week ago -  7 years 1 week ago [\#313114](#313114) by [mariussport](/forum/user/9713-mariussport "View mariussport's Profile")  *[import mass actions the TAX change](/forum/35-orders-management/898685-import-mass-actions-the-tax-change#313114 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.3.8  hi,  Do you know that when a import.csv is whithout the colom product&#95;tax&#95; all taxes are changed to whitout tax in products that normaly have a tax as Hihg 21%?  Such happend when i want all (category) products by mass actions export and import, to change product codes or product names i have to take also the product&#95;tax. Then it is save.  Is that because i change for the variants the product&#95;code? I take the coloms product&#95;id and the product&#95;parent&#95;id in the csv and it is not &quot;realy&quot; a new product then.  regards,  Marius")* was created by *[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")*

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.3.8

hi,

Do you know that when a import.csv is whithout the colom product_tax_ all taxes are changed to whitout tax in products that normaly have a tax as Hihg 21%?

Such happend when i want all (category) products by mass actions export and import, to change product codes or product names i have to take also the product_tax. Then it is save.

Is that because i change for the variants the product_code? I take the coloms product_id and the product_parent_id in the csv and it is not "realy" a new product then.

regards,

Marius

Last edit: 7 years 1 week ago by [mariussport](/forum/user/9713-mariussport "View mariussport's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5ODY4NS1pbXBvcnQtbWFzcy1hY3Rpb25zLXRoZS10YXgtY2hhbmdlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

7 years 1 week ago [\#313126](#313126) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[import mass actions the TAX change](/forum/35-orders-management/898685-import-mass-actions-the-tax-change#313126 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.3.8  hi,  Do you know that when a import.csv is whithout the colom product&#95;tax&#95; all taxes are changed to whitout tax in products that normaly have a tax as Hihg 21%?  Such happend when i want all (category) products by mass actions export and import, to change product codes or product names i have to take also the product&#95;tax. Then it is save.  Is that because i change for the variants the product&#95;code? I take the coloms product&#95;id and the product&#95;parent&#95;id in the csv and it is not &quot;realy&quot; a new product then.  regards,  Marius")*

Hi,

I don't see why that would change.
I've looked at the code of the mass action import and the only place where the product_tax_id is mentioned is in that piece: Code:

if(!empty($data-&gt;elements[$id]-&gt;price_value_with_tax)){ $currencyHelper = hikashop_get('class.currency'); if(empty($data-&gt;elements[$id]-&gt;product_tax_id)){ if(!empty($oldElement-&gt;product_tax_id)){ $data-&gt;elements[$id]-&gt;product_tax_id = $oldElement-&gt;product_tax_id; }else{ $data-&gt;elements[$id]-&gt;product_tax_id = $currencyHelper-&gt;getTaxCategory(); } } if($data-&gt;elements[$id]-&gt;product_tax_id){ if(strpos($data-&gt;elements[$id]-&gt;price_value_with_tax,'&#124;')===false){ $data-&gt;elements[$id]-&gt;price_value = $currencyHelper-&gt;getUntaxedPrice(hikashop_toFloat($data-&gt;elements[$id]-&gt;price_value_with_tax),hikashop_getZone(),$data-&gt;elements[$id]-&gt;product_tax_id); }else{ $price_value = explode('&#124;',$data-&gt;elements[$id]-&gt;price_value_with_tax); foreach($price_value as $k =&gt; $price_value_one){ $price_value[$k] = $currencyHelper-&gt;getUntaxedPrice($price_value_one,hikashop_getZone(),$data-&gt;elements[$id]-&gt;product_tax_id); } $data-&gt;elements[$id]-&gt;price_value = implode('&#124;',$price_value); } } unset($data-&gt;elements[$id]-&gt;price_value_with_tax); }

What this code does is that if there is the price_value_with_tax column in the CSV, it calculates the price_value out of it based on the product_tax_id of the product. And if the product_tax_id column is not in the CSV, it tries to load it from the database, and if there isn't any in the database, it takes the default tax category id.

Do you have other filters or actions in your mass action ?
Do you have other mass actions ? Like for example one which does things on the product_tax_id when a product is updated ?

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

- **[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")**
- [![mariussport's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/car.gif)](/forum/user/9713-mariussport "View mariussport's Profile") Topic Author
- [ Offline](/forum/user/9713-mariussport)
- Test fase

Less More

- Posts: 122
- Thank you received: 3
-
-
-
- [](http://bal.mariusklabbers.nl)
-

7 years 4 days ago [\#313306](#313306) by [mariussport](/forum/user/9713-mariussport "View mariussport's Profile")  Replied by *[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")* on topic *[import mass actions the TAX change](/forum/35-orders-management/898685-import-mass-actions-the-tax-change#313306 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.3.8  hi,  Do you know that when a import.csv is whithout the colom product&#95;tax&#95; all taxes are changed to whitout tax in products that normaly have a tax as Hihg 21%?  Such happend when i want all (category) products by mass actions export and import, to change product codes or product names i have to take also the product&#95;tax. Then it is save.  Is that because i change for the variants the product&#95;code? I take the coloms product&#95;id and the product&#95;parent&#95;id in the csv and it is not &quot;realy&quot; a new product then.  regards,  Marius")*

hi,

we work only whith prices whithout tax. i tested this morning many posibilities of the import columns. CSV with and without the price_tax-id. price and price whith tax.
First i made a Tax category default. This was maybe the problem it was not there, we use normaly the tax rule for Netherlands high 21%
But all variants show me that i need the column price_tax_id. Otherwise it went wrong. ( to none tax rule)

I disabled all mass actions and no other filters active.
thanks for your answer, i have to take care about my mass actions and keep always all important columns in the csv, so i don't lose something!

When i change the product codes by mass action "show results" everything works perfect, also whithout showing tax, but that is slower than a csv
to change a lot codes.

regards,

Marius
ps. installed also today the newest buss hika 4.2.2

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5ODY4NS1pbXBvcnQtbWFzcy1hY3Rpb25zLXRoZS10YXgtY2hhbmdlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

7 years 4 days ago [\#313310](#313310) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[import mass actions the TAX change](/forum/35-orders-management/898685-import-mass-actions-the-tax-change#313310 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.3.8  hi,  Do you know that when a import.csv is whithout the colom product&#95;tax&#95; all taxes are changed to whitout tax in products that normaly have a tax as Hihg 21%?  Such happend when i want all (category) products by mass actions export and import, to change product codes or product names i have to take also the product&#95;tax. Then it is save.  Is that because i change for the variants the product&#95;code? I take the coloms product&#95;id and the product&#95;parent&#95;id in the csv and it is not &quot;realy&quot; a new product then.  regards,  Marius")*

Hi,

I'm not following you.
There is no price_tax_id column.
The column where you need to fill the tax category id is called product_tax_id.

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

- **[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")**
- [![mariussport's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/car.gif)](/forum/user/9713-mariussport "View mariussport's Profile") Topic Author
- [ Offline](/forum/user/9713-mariussport)
- Test fase

Less More

- Posts: 122
- Thank you received: 3
-
-
-
- [](http://bal.mariusklabbers.nl)
-

7 years 3 days ago [\#313352](#313352) by [mariussport](/forum/user/9713-mariussport "View mariussport's Profile")  Replied by *[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")* on topic *[import mass actions the TAX change](/forum/35-orders-management/898685-import-mass-actions-the-tax-change#313352 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.3.8  hi,  Do you know that when a import.csv is whithout the colom product&#95;tax&#95; all taxes are changed to whitout tax in products that normaly have a tax as Hihg 21%?  Such happend when i want all (category) products by mass actions export and import, to change product codes or product names i have to take also the product&#95;tax. Then it is save.  Is that because i change for the variants the product&#95;code? I take the coloms product&#95;id and the product&#95;parent&#95;id in the csv and it is not &quot;realy&quot; a new product then.  regards,  Marius")*

sorry my mistake, indeed the column product_tax_id
because i was also testing the columns price_value and price_value_with_tax both, then the result is one price whith tax
like in the code at the end }
unset($data-&gt;elements[$id]-&gt;price_value_with_tax);
}
so my result is that i need "always" the column product_tax_id with csv import. test i mde on local sites and online site. Hika 4.2.2 and i think it was no so in earlier versions??

so i work on and see if you want to tell more about this but not necessarily

regards, Marius

- [ ![Defaulttaxactive.png](/forum/attachment/48253) ](/forum/attachment/48253 "...ttaxactive.png") [ ](/forum/attachment/48253?download=1 "...ttaxactive.png")
- [ ![yescolomntax.png](/forum/attachment/48254) ](/forum/attachment/48254 "yescolomntax.png") [ ](/forum/attachment/48254?download=1 "yescolomntax.png")
- [ ![nocolumntax.png](/forum/attachment/48255) ](/forum/attachment/48255 "nocolumntax.png") [ ](/forum/attachment/48255?download=1 "nocolumntax.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5ODY4NS1pbXBvcnQtbWFzcy1hY3Rpb25zLXRoZS10YXgtY2hhbmdlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

7 years 3 days ago [\#313355](#313355) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[import mass actions the TAX change](/forum/35-orders-management/898685-import-mass-actions-the-tax-change#313355 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.3.8  hi,  Do you know that when a import.csv is whithout the colom product&#95;tax&#95; all taxes are changed to whitout tax in products that normaly have a tax as Hihg 21%?  Such happend when i want all (category) products by mass actions export and import, to change product codes or product names i have to take also the product&#95;tax. Then it is save.  Is that because i change for the variants the product&#95;code? I take the coloms product&#95;id and the product&#95;parent&#95;id in the csv and it is not &quot;realy&quot; a new product then.  regards,  Marius")*

Hi,

If you only specify the price_value column you shouldn't need the product_tax_id column. However, if you use the price_value_with_tax column, the product_tax_id column is necessary since only the untaxed price is stored in the database.
And we didn't change the import since a long time so I don't see why something would be different regarding all that between the 4.2.1 and the 4.2.2.

Actually the last change we made to the import was 1 year ago. It was to make sure to get the product_tax_id from the template product if any selected instead of blindly using the default one. It was a fix added for that error:
[ www.hikashop.com/forum/content-creation/...category.html#300917](https://www.hikashop.com/forum/content-creation/896321-copy-of-product-wrong-tax-category.html#300917)
So, if you are using a template product with your import and that this template product doesn't have a tax category configured, and supposing that you updated your HikaShop from a version older than 1 year ago to a recent one, it's possible that you saw a change in behavior as before it would use the default tax category and now it's not setting the tax category as it is not set in the template product. In such case, you would have to properly set the tax category in the template product in order to not have to set the product_tax_id column in your CSV.

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

- **[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")**
- [![mariussport's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/car.gif)](/forum/user/9713-mariussport "View mariussport's Profile") Topic Author
- [ Offline](/forum/user/9713-mariussport)
- Test fase

Less More

- Posts: 122
- Thank you received: 3
-
-
-
- [](http://bal.mariusklabbers.nl)
-

7 years 2 days ago [\#313382](#313382) by [mariussport](/forum/user/9713-mariussport "View mariussport's Profile")  Replied by *[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")* on topic *[import mass actions the TAX change](/forum/35-orders-management/898685-import-mass-actions-the-tax-change#313382 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.3.8  hi,  Do you know that when a import.csv is whithout the colom product&#95;tax&#95; all taxes are changed to whitout tax in products that normaly have a tax as Hihg 21%?  Such happend when i want all (category) products by mass actions export and import, to change product codes or product names i have to take also the product&#95;tax. Then it is save.  Is that because i change for the variants the product&#95;code? I take the coloms product&#95;id and the product&#95;parent&#95;id in the csv and it is not &quot;realy&quot; a new product then.  regards,  Marius")*

Thank you, now it's clear, when i use a template product (whitout a image) by the import csv everything works fine!
In all the years i know that the template was there but i never used it.

i made a not published clean product with default tax, is that correct? Or can i find more about a template product in the documentation?

Marius

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5ODY4NS1pbXBvcnQtbWFzcy1hY3Rpb25zLXRoZS10YXgtY2hhbmdlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

7 years 2 days ago [\#313383](#313383) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[import mass actions the TAX change](/forum/35-orders-management/898685-import-mass-actions-the-tax-change#313383 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.3.8  hi,  Do you know that when a import.csv is whithout the colom product&#95;tax&#95; all taxes are changed to whitout tax in products that normaly have a tax as Hihg 21%?  Such happend when i want all (category) products by mass actions export and import, to change product codes or product names i have to take also the product&#95;tax. Then it is save.  Is that because i change for the variants the product&#95;code? I take the coloms product&#95;id and the product&#95;parent&#95;id in the csv and it is not &quot;realy&quot; a new product then.  regards,  Marius")*

Hi,

We talk a bit about this option there: [ www.hikashop.com/support/documentation/7...import.html#generate](https://www.hikashop.com/support/documentation/73-hikashop-import.html#generate)
But you won't find much.

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

- **[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")**
- [![mariussport's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/car.gif)](/forum/user/9713-mariussport "View mariussport's Profile") Topic Author
- [ Offline](/forum/user/9713-mariussport)
- Test fase

Less More

- Posts: 122
- Thank you received: 3
-
-
-
- [](http://bal.mariusklabbers.nl)
-

7 years 2 days ago [\#313409](#313409) by [mariussport](/forum/user/9713-mariussport "View mariussport's Profile")  Replied by *[mariussport](/forum/user/9713-mariussport "View mariussport's Profile")* on topic *[import mass actions the TAX change](/forum/35-orders-management/898685-import-mass-actions-the-tax-change#313409 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.3.8  hi,  Do you know that when a import.csv is whithout the colom product&#95;tax&#95; all taxes are changed to whitout tax in products that normaly have a tax as Hihg 21%?  Such happend when i want all (category) products by mass actions export and import, to change product codes or product names i have to take also the product&#95;tax. Then it is save.  Is that because i change for the variants the product&#95;code? I take the coloms product&#95;id and the product&#95;parent&#95;id in the csv and it is not &quot;realy&quot; a new product then.  regards,  Marius")*

yes i know that documentation already, indeed it is petit. So i am happy with the template product new and have good results!

So thank you and close this item OK.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5ODY4NS1pbXBvcnQtbWFzcy1hY3Rpb25zLXRoZS10YXgtY2hhbmdlP3RtcGw9bWFya2Rvd24=) 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.061 seconds

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