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

#   CSV Import mandatory columns?

##

- **[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")**
- [![ydingilski's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37980.png)](/forum/user/37980-ydingilski "View ydingilski's Profile") Topic Author
- [ Offline](/forum/user/37980-ydingilski)

Less More

- Posts: 52
- Thank you received: 0
-
-
-
- [](http://www.filkab.solar)
-

11 years 4 months ago [\#209401](#209401) by [ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")  *[CSV Import mandatory columns?](/forum/37-import-export-csv-xls/878362-csv-import-mandatory-columns#209401 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.15  I'm importing products using the CSV import option. I do NEVER include all the columns in the CSV file, only the ones that have some information. I've noticed that when importing VARIANTS, if I do not include the column &quot;product&#95;tax&#95;id&quot; in the csv file, the value is automatically filled in with the default tax id. If I create the variants manually through the back-end, the &quot;product&#95;tax&#95;id&quot; column has value of &quot;0&quot;. I guess this is the correct value for variants, not the default tax id.  My question: WHAT ARE THE MANDATORY FIELDS, WHEN IMPORTING CSV FILE, IN ORDER TO MAKE SURE THEY ARE NOT FILLED IN AUTOMATICALLY WITH INCORRECT VALUES?  P.S. I also noticed a little mess in the &quot;fx904&#95;hikashop&#95;variant&quot; table when importing variants with CSV file. Could you please explain about the ordering column in that table? When the values are not 0?")* was created by *[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")*

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.3.15

I'm importing products using the CSV import option. I do NEVER include all the columns in the CSV file, only the ones that have some information.
I've noticed that when importing VARIANTS, if I do not include the column "product_tax_id" in the csv file, the value is automatically filled in with the default tax id. If I create the variants manually through the back-end, the "product_tax_id" column has value of "0". I guess this is the correct value for variants, not the default tax id.

My question: WHAT ARE THE MANDATORY FIELDS, WHEN IMPORTING CSV FILE, IN ORDER TO MAKE SURE THEY ARE NOT FILLED IN AUTOMATICALLY WITH INCORRECT VALUES?

P.S. I also noticed a little mess in the "fx904_hikashop_variant" table when importing variants with CSV file. Could you please explain about the ordering column in that table? When the values are not 0?

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

- **[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")**
- [![ydingilski's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37980.png)](/forum/user/37980-ydingilski "View ydingilski's Profile") Topic Author
- [ Offline](/forum/user/37980-ydingilski)

Less More

- Posts: 52
- Thank you received: 0
-
-
-
- [](http://www.filkab.solar)
-

11 years 4 months ago [\#209422](#209422) by [ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")  Replied by *[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")* on topic *[CSV Import mandatory columns?](/forum/37-import-export-csv-xls/878362-csv-import-mandatory-columns#209422 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.15  I'm importing products using the CSV import option. I do NEVER include all the columns in the CSV file, only the ones that have some information. I've noticed that when importing VARIANTS, if I do not include the column &quot;product&#95;tax&#95;id&quot; in the csv file, the value is automatically filled in with the default tax id. If I create the variants manually through the back-end, the &quot;product&#95;tax&#95;id&quot; column has value of &quot;0&quot;. I guess this is the correct value for variants, not the default tax id.  My question: WHAT ARE THE MANDATORY FIELDS, WHEN IMPORTING CSV FILE, IN ORDER TO MAKE SURE THEY ARE NOT FILLED IN AUTOMATICALLY WITH INCORRECT VALUES?  P.S. I also noticed a little mess in the &quot;fx904&#95;hikashop&#95;variant&quot; table when importing variants with CSV file. Could you please explain about the ordering column in that table? When the values are not 0?")*

I believe I figured out the "fx904_hikashop_variant" table.
The ORDERING field determines how are the characteristics groups /not values/ ordered both in the back-end and in the front end. There is dedicated option in the configuration for the characteristics values order - the values in the front-end drop down combo box.

The initial question about mandatory fields in the csv file still remains???

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

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

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 4 months ago -  11 years 4 months ago [\#209409](#209409) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[CSV Import mandatory columns?](/forum/37-import-export-csv-xls/878362-csv-import-mandatory-columns#209409 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.15  I'm importing products using the CSV import option. I do NEVER include all the columns in the CSV file, only the ones that have some information. I've noticed that when importing VARIANTS, if I do not include the column &quot;product&#95;tax&#95;id&quot; in the csv file, the value is automatically filled in with the default tax id. If I create the variants manually through the back-end, the &quot;product&#95;tax&#95;id&quot; column has value of &quot;0&quot;. I guess this is the correct value for variants, not the default tax id.  My question: WHAT ARE THE MANDATORY FIELDS, WHEN IMPORTING CSV FILE, IN ORDER TO MAKE SURE THEY ARE NOT FILLED IN AUTOMATICALLY WITH INCORRECT VALUES?  P.S. I also noticed a little mess in the &quot;fx904&#95;hikashop&#95;variant&quot; table when importing variants with CSV file. Could you please explain about the ordering column in that table? When the values are not 0?")*

Hi,

The product_tax_id field should not be a mandatory field. It takes the values set by default in Configuration &gt; Main &gt; Taxes.
This tax id should not be used for the variants, but get the parent tax id, is the taxed price incorrect when selecting a variant on frontend ?

Regarding the ordering, you're right that's indeed the goal.

Last edit: 11 years 4 months ago by [Xavier](/forum/user/4105-xavier "View Xavier's Profile").

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

- **[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")**
- [![ydingilski's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37980.png)](/forum/user/37980-ydingilski "View ydingilski's Profile") Topic Author
- [ Offline](/forum/user/37980-ydingilski)

Less More

- Posts: 52
- Thank you received: 0
-
-
-
- [](http://www.filkab.solar)
-

11 years 4 months ago [\#209677](#209677) by [ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")  Replied by *[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")* on topic *[CSV Import mandatory columns?](/forum/37-import-export-csv-xls/878362-csv-import-mandatory-columns#209677 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.15  I'm importing products using the CSV import option. I do NEVER include all the columns in the CSV file, only the ones that have some information. I've noticed that when importing VARIANTS, if I do not include the column &quot;product&#95;tax&#95;id&quot; in the csv file, the value is automatically filled in with the default tax id. If I create the variants manually through the back-end, the &quot;product&#95;tax&#95;id&quot; column has value of &quot;0&quot;. I guess this is the correct value for variants, not the default tax id.  My question: WHAT ARE THE MANDATORY FIELDS, WHEN IMPORTING CSV FILE, IN ORDER TO MAKE SURE THEY ARE NOT FILLED IN AUTOMATICALLY WITH INCORRECT VALUES?  P.S. I also noticed a little mess in the &quot;fx904&#95;hikashop&#95;variant&quot; table when importing variants with CSV file. Could you please explain about the ordering column in that table? When the values are not 0?")*

Hi Xavier,
The price on the front-end is correct in both cases. I believe there is a little bug in the code when importing CSV - the tax id field should always be zero for variants, or it should report an error message.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzgzNjItY3N2LWltcG9ydC1tYW5kYXRvcnktY29sdW1ucz90bXBsPW1hcmtkb3du) 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: 86587
- Thank you received: 14326
-
-

11 years 4 months ago [\#209683](#209683) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[CSV Import mandatory columns?](/forum/37-import-export-csv-xls/878362-csv-import-mandatory-columns#209683 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.15  I'm importing products using the CSV import option. I do NEVER include all the columns in the CSV file, only the ones that have some information. I've noticed that when importing VARIANTS, if I do not include the column &quot;product&#95;tax&#95;id&quot; in the csv file, the value is automatically filled in with the default tax id. If I create the variants manually through the back-end, the &quot;product&#95;tax&#95;id&quot; column has value of &quot;0&quot;. I guess this is the correct value for variants, not the default tax id.  My question: WHAT ARE THE MANDATORY FIELDS, WHEN IMPORTING CSV FILE, IN ORDER TO MAKE SURE THEY ARE NOT FILLED IN AUTOMATICALLY WITH INCORRECT VALUES?  P.S. I also noticed a little mess in the &quot;fx904&#95;hikashop&#95;variant&quot; table when importing variants with CSV file. Could you please explain about the ordering column in that table? When the values are not 0?")*

Hi,

Thank you for the feedback.
You can add the code: Code:

else{ //the variants should not have a tax id. $product-&gt;product_tax_id = 0; }

after the code: Code:

if($product-&gt;product_type=='main'){ if(!empty($product-&gt;product_parent_id)){ $app = JFactory::getApplication(); $app-&gt;enqueueMessage('The product '.@$product-&gt;product_code.' should have an empty value instead of the value '.$product-&gt;product_parent_id.' in the field product_parent_id as it is a main product (not a variant) and thus doesn\'t have any parent.','error'); } }

in the file administrator/components/com_hikashop/helpers/import.php and that should do it.

The following user(s) said Thank You: [ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")

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

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