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

#   Updating Product Codes Using Import Function

##

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

Less More

- Posts: 97
- Thank you received: 8
-
-

1 year 11 months ago -  1 year 11 months ago [\#364274](#364274) by [daduts](/forum/user/1658-daduts "View daduts's Profile")  *[Updating Product Codes Using Import Function](/forum/37-import-export-csv-xls/908833-updating-product-codes-using-import-function#364274 "-- HikaShop version -- : 5.1.1 Biz -- Joomla version -- : 4.4.9 -- PHP version -- : 8.2.25 -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : none  Greetings,  My client is redefining their part #'s. We have over 700 product codes to update including both main products and variants.  I'm attempting to use the product import function to perform these updates.  After some trial and error I've found a .csv file format that uploads without generating hikashop errors.  My latest iteration of .csv file format looks like this.....  product&#95;id,product&#95;parent&#95;id,product&#95;code,product&#95;type 557,556,8511-BX,variant 558,556,8511-CS,variant 570,,690-159200201,main 581,,6400-SERIES,main 601,,TYPE-I-BARRICADE-SERIES,main 602,,TYPE-II-BARRICADE-SERIES,main .....  It successfully uploads but leaves me with mixed results....  - some main products and variants update fine - some update the product&#95;code but also alter other fields.....descriptions, seo fields and others contents have disappeared, quantity has been changed to 0 - some products are updated in the database but no longer appear in the front end nor backend of the site.  got any ideas on what i;m doing wrong ?  your support is always appreciated,  Dave")* was created by *[daduts](/forum/user/1658-daduts "View daduts's Profile")*

-- HikaShop version -- : 5.1.1 Biz
-- Joomla version -- : 4.4.9
-- PHP version -- : 8.2.25
-- Browser(s) name and version -- : Firefox
-- Error-message(debug-mod must be tuned on) -- : none

Greetings,

My client is redefining their part #'s. We have over 700 product codes to update including both main products and variants.

I'm attempting to use the product import function to perform these updates.

After some trial and error I've found a .csv file format that uploads without generating hikashop errors.

My latest iteration of .csv file format looks like this.....

product_id,product_parent_id,product_code,product_type
557,556,8511-BX,variant
558,556,8511-CS,variant
570,,690-159200201,main
581,,6400-SERIES,main
601,,TYPE-I-BARRICADE-SERIES,main
602,,TYPE-II-BARRICADE-SERIES,main
.....

It successfully uploads but leaves me with mixed results....

- some main products and variants update fine
- some update the product_code but also alter other fields.....descriptions, seo fields and others contents have disappeared, quantity has been changed to 0
- some products are updated in the database but no longer appear in the front end nor backend of the site.

got any ideas on what i;m doing wrong ?

your support is always appreciated,

Dave

Last edit: 1 year 11 months ago by [daduts](/forum/user/1658-daduts "View daduts's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy85MDg4MzMtdXBkYXRpbmctcHJvZHVjdC1jb2Rlcy11c2luZy1pbXBvcnQtZnVuY3Rpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86324
- Thank you received: 14286
-
-

1 year 11 months ago [\#364279](#364279) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Updating Product Codes Using Import Function](/forum/37-import-export-csv-xls/908833-updating-product-codes-using-import-function#364279 "-- HikaShop version -- : 5.1.1 Biz -- Joomla version -- : 4.4.9 -- PHP version -- : 8.2.25 -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : none  Greetings,  My client is redefining their part #'s. We have over 700 product codes to update including both main products and variants.  I'm attempting to use the product import function to perform these updates.  After some trial and error I've found a .csv file format that uploads without generating hikashop errors.  My latest iteration of .csv file format looks like this.....  product&#95;id,product&#95;parent&#95;id,product&#95;code,product&#95;type 557,556,8511-BX,variant 558,556,8511-CS,variant 570,,690-159200201,main 581,,6400-SERIES,main 601,,TYPE-I-BARRICADE-SERIES,main 602,,TYPE-II-BARRICADE-SERIES,main .....  It successfully uploads but leaves me with mixed results....  - some main products and variants update fine - some update the product&#95;code but also alter other fields.....descriptions, seo fields and others contents have disappeared, quantity has been changed to 0 - some products are updated in the database but no longer appear in the front end nor backend of the site.  got any ideas on what i;m doing wrong ?  your support is always appreciated,  Dave")*

Hi,

The import system bases itself on the product_code to match the products in the database with the products in the CSV.
Also, the import system is geared towards import of all the product information. Small updates won't work well with it. I would recommend reverting the changes made by your import.

Here is what I recommend instead in your case:
- create a custom product field via the menu Display&gt;Custom fields where you'll be storing the new product code
- modify your CSV file to have the old product code in the product_code column, add a new column for the custom field with the new product code, and remove the product_id, product_parent_id and product_type columns. You don't need to bother with that.
- create a mass action via the menu System&gt;Mass actions and use the filter "CSV import" to import the CSV file with the two columns. Run the mass action with the checkbox of the filter to save checked.
- create another mass action with a filter on the custom field column not being empty, and an action "update the values" on the "product_code" column with the mode "operation" and the value product.xxx where xxx is the column of the custom field. When you run the mass action, it will replace the old product code with the new one from the custom field.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy85MDg4MzMtdXBkYXRpbmctcHJvZHVjdC1jb2Rlcy11c2luZy1pbXBvcnQtZnVuY3Rpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 97
- Thank you received: 8
-
-

1 year 11 months ago [\#364311](#364311) by [daduts](/forum/user/1658-daduts "View daduts's Profile")  Replied by *[daduts](/forum/user/1658-daduts "View daduts's Profile")* on topic *[Updating Product Codes Using Import Function](/forum/37-import-export-csv-xls/908833-updating-product-codes-using-import-function#364311 "-- HikaShop version -- : 5.1.1 Biz -- Joomla version -- : 4.4.9 -- PHP version -- : 8.2.25 -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : none  Greetings,  My client is redefining their part #'s. We have over 700 product codes to update including both main products and variants.  I'm attempting to use the product import function to perform these updates.  After some trial and error I've found a .csv file format that uploads without generating hikashop errors.  My latest iteration of .csv file format looks like this.....  product&#95;id,product&#95;parent&#95;id,product&#95;code,product&#95;type 557,556,8511-BX,variant 558,556,8511-CS,variant 570,,690-159200201,main 581,,6400-SERIES,main 601,,TYPE-I-BARRICADE-SERIES,main 602,,TYPE-II-BARRICADE-SERIES,main .....  It successfully uploads but leaves me with mixed results....  - some main products and variants update fine - some update the product&#95;code but also alter other fields.....descriptions, seo fields and others contents have disappeared, quantity has been changed to 0 - some products are updated in the database but no longer appear in the front end nor backend of the site.  got any ideas on what i;m doing wrong ?  your support is always appreciated,  Dave")*

Thanks nicholas for the quick response.

One question....

could the new method work if the two columns in my import file are product_id and the custom field instead of product_code and the custom field ?
would save me a bunch of work.

Thanks

Dave

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy85MDg4MzMtdXBkYXRpbmctcHJvZHVjdC1jb2Rlcy11c2luZy1pbXBvcnQtZnVuY3Rpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86324
- Thank you received: 14286
-
-

1 year 11 months ago [\#364318](#364318) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Updating Product Codes Using Import Function](/forum/37-import-export-csv-xls/908833-updating-product-codes-using-import-function#364318 "-- HikaShop version -- : 5.1.1 Biz -- Joomla version -- : 4.4.9 -- PHP version -- : 8.2.25 -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : none  Greetings,  My client is redefining their part #'s. We have over 700 product codes to update including both main products and variants.  I'm attempting to use the product import function to perform these updates.  After some trial and error I've found a .csv file format that uploads without generating hikashop errors.  My latest iteration of .csv file format looks like this.....  product&#95;id,product&#95;parent&#95;id,product&#95;code,product&#95;type 557,556,8511-BX,variant 558,556,8511-CS,variant 570,,690-159200201,main 581,,6400-SERIES,main 601,,TYPE-I-BARRICADE-SERIES,main 602,,TYPE-II-BARRICADE-SERIES,main .....  It successfully uploads but leaves me with mixed results....  - some main products and variants update fine - some update the product&#95;code but also alter other fields.....descriptions, seo fields and others contents have disappeared, quantity has been changed to 0 - some products are updated in the database but no longer appear in the front end nor backend of the site.  got any ideas on what i;m doing wrong ?  your support is always appreciated,  Dave")*

Hi,

No, the mass action import also bases itself on the product_code, not the product_id.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy85MDg4MzMtdXBkYXRpbmctcHJvZHVjdC1jb2Rlcy11c2luZy1pbXBvcnQtZnVuY3Rpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.101 seconds

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