Jump to content

[SOLVED] I need change id of group product


Recommended Posts

I have a serious problem with a recently purchased template. Right now I don't have time to wait for your painful support, or to turn back.

For this reason I need to change the id number of a product group.

I have two groups of Hosting products.

  • An old one with no products currently in use (id 1)
  • Another current one that is the one that I want to convert to id=1

I have seen the following after doing an analysis of the tables.

  • tblproductgroup id
  • tblproducts gid is associated to tblproductgroup.id
  • tblproducts_slug group_id is associated to tblproductgroup.id
  • tblproductslinks gid is associated to tblproductgroup.id
  • tblproductconfigoptions gid is associated to tblproductgroup.id

I only want to exchange the id, since due to the bad programming of the template, I have to do it to avoid a tremendous UX problem, and the fastest way is for the current Hosting group to come out first in the drop-down list.

Is something left in the pipeline before executing the sql that will change the corresponding id?

tblproducts_slugs_tracking slug_id ??? tblproduct.id ?


Best regrads.

Edited by Abdelkarim
Link to comment
Share on other sites


UPDATE tblproductgroups SET id=35 WHERE id=1;
UPDATE tblproducts SET gid=35 WHERE gid=1;
UPDATE tblproducts_slugs SET group_id=35 WHERE group_id=1;
UPDATE tblproductgroups SET id=1 WHERE id=27;
UPDATE tblproducts SET gid=1 WHERE gid=27;
UPDATE tblproducts_slugs SET group_id=1 WHERE group_id=27;



And working

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated