Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    279
    Plugin Contributions
    0

    Default new products are always coming up product_id = 0

    A while back, after clearing out mySQL, I tried entering products from the admin. They get messed up with product_id = 0.

    I have to go into the database and change the 3 tables for products so that product has another product ID number.

    Is there a way to fix this problem for good without erasing my database?


    thanks,
    Jeff Michaels

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

    Default Re: new products are always coming up product_id = 0

    Did you break or otherwise remove the autoincrement on the products table?

    Many of the tables have autoincrements on them and imports, exports, emptying tables in unplanned manners etc. will damage this from time to time ...

    Look at the /zc_install/sql/db_rebuild_autoincrement.sql

    This should rebuild these for you ...

    WARNING: Always make a backup before attempting this ...
    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: v1.5.5]
    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!

  3. #3
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    279
    Plugin Contributions
    0

    Default Re: new products are always coming up product_id = 0

    yep, that fixed it. thanks

    Will this mess up my importing directly into mySQL now? Bypassing the admin.
    Will it renumber my importing of preselected id's from my office database?
    (I hope not.....)

    thanks,
    Jeff

  4. #4
    Join Date
    May 2005
    Posts
    50
    Plugin Contributions
    0

    Default Re: new products are always coming up product_id = 0

    Thanks! I had this happen before and I forgot how to fix it. All I did was change the extra field in the products table on product_id to auto_increment and everything worked.

 

 

Similar Threads

  1. Replies: 17
    Last Post: 14 Apr 2015, 05:55 PM
  2. Adding New Products makes NULL Product_id
    By vetpro in forum General Questions
    Replies: 2
    Last Post: 3 Oct 2011, 03:13 PM
  3. Sale / New Products / Coming Soon - link to sub cats?
    By pharry in forum General Questions
    Replies: 0
    Last Post: 23 Jun 2009, 02:40 PM
  4. Specify product_id or pull up products by model instead?
    By stevenlee in forum General Questions
    Replies: 0
    Last Post: 13 Mar 2009, 03:15 AM
  5. Products always staying in NEW category
    By rheroux in forum Setting Up Specials and SaleMaker
    Replies: 3
    Last Post: 24 Aug 2008, 02:31 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR