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

#   Change product\_id in mysql

##

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

Less More

- Posts: 1
- Thank you received: 0
-
-

5 years 2 months ago [\#335713](#335713) by [Imaginis](/forum/user/62246-imaginis "View Imaginis's Profile")  *[Change product\_id in mysql](/forum/26-product-category-display/903192-change-product-id-in-mysql#335713 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.21 -- PHP version -- : 7.2  Hello,  I need to recreate identically deleted products and reassign them the same product&#95;id (so that a CRM can edit past stats...).  Can you confirm that I just need to modify the product&#95;id in the hikashop&#95;product and in the hikashop&#95;product&#95;category tables for a simple product without variants. Don't I forget other tables where the product&#95;id is present?  Thanks in advance for your feedback.")* was created by *[Imaginis](/forum/user/62246-imaginis "View Imaginis's Profile")*

-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9.21
-- PHP version -- : 7.2

Hello,

I need to recreate identically deleted products and reassign them the same product_id (so that a CRM can edit past stats...).

Can you confirm that I just need to modify the product_id in the hikashop_product and in the hikashop_product_category tables for a simple product without variants. Don't I forget other tables where the product_id is present?

Thanks in advance for your feedback.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDMxOTItY2hhbmdlLXByb2R1Y3QtaWQtaW4tbXlzcWw/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: 86593
- Thank you received: 14334
-
-

5 years 2 months ago [\#335719](#335719) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Change product\_id in mysql](/forum/26-product-category-display/903192-change-product-id-in-mysql#335719 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.21 -- PHP version -- : 7.2  Hello,  I need to recreate identically deleted products and reassign them the same product&#95;id (so that a CRM can edit past stats...).  Can you confirm that I just need to modify the product&#95;id in the hikashop&#95;product and in the hikashop&#95;product&#95;category tables for a simple product without variants. Don't I forget other tables where the product&#95;id is present?  Thanks in advance for your feedback.")*

Hi,

You need to do this:
1 - create a new product and save it, without changing anything in it.
2 - change its id in both the hikashop_product and the hikahop_product_category tables
3 - then, you can add prices, images, options, etc via the interface

If you do step 3 before step 2, then you also need to update the product_id in the other tables, like hikashop_price where the prices are stored, or hikashop_file where the files and images are stored, etc. So it will get more complex and you might miss some entries.

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

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