Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default how to create or edit specific category id number?

    what is the "best/safest" way to create a category with a specific id number?

    or edit an id number say 311 change to 88?

    thanks.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: how to create or edit specific category id number?

    The category id is auto-generated by the database, and incremented to one more than the last created category id. It would be dangerous to alter that; if you were to alter it to a no-longer-used number, there are other tables where you would have to make the same alteration.

  3. #3
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default Re: how to create or edit specific category id number?

    thanks gjh42.

    what happened was i had a category 88 but it didn't have any subcats. i need to add subcats. so i created a new cat with subcats 311 and put everything in there. but i accidentally deleted cat 88. :-(

    so now i want to rename 311 to 88...
    or create a new cat 88 and copy everything from 311 into it.

    the only reason i am considering doing this is because i have links indexed to the cat 88...

    any advice?

    thanks.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: how to create or edit specific category id number?

    This requires someone like Ajeh with intimate knowledge of the database tables, who can tell you all the tables that need to be coordinated for this task (and the SQL to do it).

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: how to create or edit specific category id number?

    Backup your database before doing this ...

    Then run the following SQL commands to rebuild the tables so that all references to Categories to change categories_id 311 to 88 ...

    UPDATE categories SET categories_id = 88 WHERE categories_id = 311;
    UPDATE categories_description SET categories_id = 88 WHERE categories_id = 311;
    UPDATE products SET master_categories_id = 88 WHERE master_categories_id = 311;
    UPDATE products_to_categories SET categories_id = 88 WHERE categories_id = 311;
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default Re: how to create or edit specific category id number?

    you know you're awesome! as always, thanks ajeh!!!


  7. #7
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default Re: how to create or edit specific category id number?

    you know you're awesome! as always, thanks ajeh!!!


 

 

Similar Threads

  1. v154 How to create a coupon/discount code for a specific group of email address
    By kman55 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 24 May 2015, 06:11 PM
  2. How do I edit product ID number?
    By robertwebsite in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 16 Feb 2011, 05:44 PM
  3. How to edit style of (x) number?
    By sbird in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 6 Jun 2009, 06:13 PM
  4. How to edit style of (x) number?
    By sbird in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 5 Jun 2009, 07:59 PM
  5. How to edit costumer number?
    By lorhan in forum Customization from the Admin
    Replies: 3
    Last Post: 22 May 2009, 02:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg