Jump to content

Change category in phpMyAdmin


Richard Love

Recommended Posts

Hi

I want to move some products from one category to another using cPanel/phpMyAdmin, I have changed 'cat_id' in main inventory table, but it doesn't move. If I look in CubeCart_category_index I see there are records in there pointing product to old category. I believed category_index was for sub directories however that does not seem to be the case.

Is it that when a product is added to inventory a record is created in category_index and the cat_id field in inventory becomes redundant. This seems like data duplication to me.

Is there an easy way to change product categories in phpMyAdmin (altering category_index isn't easy as products are referred to by id's rather than product names).

Hope this makes sense.

Richard

Link to comment
Share on other sites

It is data redundancy, true, but I think the 'cat_id' column is kept for legacy purposes.

CubeCart does now use the CubeCart_category_index table as a many-to-many relationship: many products can be assigned to the same category, and many categories can be assigned to one product (where one of those categories is designated as the 'primary' category). This "glue" table (it 'glues' the inventory and category relationships) only needs the id numbers.

With a minimally complicated SQL query, you can make it easy to identify the product and category you wish to affect.

Link to comment
Share on other sites

Join the conversation

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

Guest
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...