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

#   Import based on MySQL

##

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

Less More

- Posts: 28
- Thank you received: 0
-
-

11 years 4 months ago [\#205887](#205887) by [wozzie](/forum/user/26495-wozzie "View wozzie's Profile")  *[Import based on MySQL](/forum/25-install-update/877727-import-based-on-mysql#205887 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 2.5  Hi,  We have a seperate MySQL database with &gt; 1000 products inside. Now, we would like to update/import changes made in this database into our Hikashop installation.  What would be the best way to accomplish this? Is there an example insert query available to properly populate all the right fields at once? How to insert the correct pricing, link to categories (based on e.g. custom field custom&#95;category).  INSERT INTO jos&#95;hikashop&#95;product (product&#95;code, product&#95;name, product&#95;description, product&#95;created, product&#95;type, product&#95;published) SELECT id, naam, omschrijving, UNIX&#95;TIMESTAMP(), 'main', '1' FROM &#96;artikelenlijst&#96; ON DUPLICATE KEY UPDATE product&#95;code = VALUES(product&#95;code), product&#95;name = VALUES(product&#95;name), product&#95;description = VALUES(product&#95;description),  Or is there a better approach?")* was created by *[wozzie](/forum/user/26495-wozzie "View wozzie's Profile")*

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 2.5

Hi,

We have a seperate MySQL database with &gt; 1000 products inside. Now, we would like to update/import changes made in this database into our Hikashop installation.

What would be the best way to accomplish this? Is there an example insert query available to properly populate all the right fields at once? How to insert the correct pricing, link to categories (based on e.g. custom field custom_category).

INSERT INTO jos_hikashop_product
(product_code, product_name, product_description,
product_created, product_type, product_published)
SELECT id, naam, omschrijving, UNIX_TIMESTAMP(), 'main', '1'
FROM &#96;artikelenlijst&#96;
ON DUPLICATE KEY UPDATE
product_code = VALUES(product_code),
product_name = VALUES(product_name),
product_description = VALUES(product_description),

Or is there a better approach?

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

Less More

- Posts: 86358
- Thank you received: 14293
-
-

11 years 4 months ago [\#205956](#205956) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Import based on MySQL](/forum/25-install-update/877727-import-based-on-mysql#205956 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 2.5  Hi,  We have a seperate MySQL database with &gt; 1000 products inside. Now, we would like to update/import changes made in this database into our Hikashop installation.  What would be the best way to accomplish this? Is there an example insert query available to properly populate all the right fields at once? How to insert the correct pricing, link to categories (based on e.g. custom field custom&#95;category).  INSERT INTO jos&#95;hikashop&#95;product (product&#95;code, product&#95;name, product&#95;description, product&#95;created, product&#95;type, product&#95;published) SELECT id, naam, omschrijving, UNIX&#95;TIMESTAMP(), 'main', '1' FROM &#96;artikelenlijst&#96; ON DUPLICATE KEY UPDATE product&#95;code = VALUES(product&#95;code), product&#95;name = VALUES(product&#95;name), product&#95;description = VALUES(product&#95;description),  Or is there a better approach?")*

Hi,

Having a few queries is the most efficient way, especially if you can write them.
We don't have examples for that however.
prices should be added in the hikashop_price table with the price_product_id containing the id of the product for each price
categories should be added in the hikashop_category table, and the links between products and categories should be added in the hikashop_product_category table.

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

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