Zen Cart Logo
Forums / General Questions / i need help with categories TABLE

i need help with categories TABLE

Locked

Views: 1,378

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
11 Jun 2007, 6:31 PM
#1
hammertime avatar

hammertime

New Zenner

Join Date:
Jun 2007
Posts:
6
Plugin Contributions:
0

i need help with categories TABLE

i accidentaly deleted the 'categories' table :blink: from the data base and manage to restore it from a backup that i had , the problem is that the categories are not showing in my shop or admin panel and the only ones that show are the ones that have a parent_id = 0 , all the data is in the tables but i dont know why is not displaying

can anyone help me on this matter im not a professional coder but i have some idea, thats why im asking for some help

thank you and hope i can solve this all my products are pending.

11 Jun 2007, 6:40 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: i need help with categories TABLE

What did you create the backup with/by?

How did you restore just this table? (what did you use)

11 Jun 2007, 7:26 PM
#3
hammertime avatar

hammertime

New Zenner

Join Date:
Jun 2007
Posts:
6
Plugin Contributions:
0

Re: i need help with categories TABLE

i had a copy of thoes tables in CSV fiels and recreate the categories TABLE with an SQL command

DROP TABLE IF EXISTS cartcategories;
CREATE TABLE cartcategories (
categories_id int(11) NOT NULL auto_increment,
categories_image varchar(64) default NULL,
parent_id int(11) NOT NULL default '0',
sort_order int(3) default NULL,
date_added datetime default NULL,
last_modified datetime default NULL,
categories_status tinyint(1) NOT NULL default '1',
PRIMARY KEY (categories_id),
KEY idx_parent_id_cat_id_zen (parent_id,categories_id),
KEY idx_status_zen (categories_status),
KEY idx_sort_order_zen (sort_order)
) ENGINE=MyISAM AUTO_INCREMENT=197 DEFAULT CHARSET=latin1 AUTO_INCREMENT=197 ;

after that i just imported the CSV file with PHPMyAdmin Panel into the table with the data and it loads perfect, but it doesnt show up and only 2 products with
parent_id=0 show up i guess some links are not right

thanks

11 Jun 2007, 7:40 PM
#4
hammertime avatar

hammertime

New Zenner

Join Date:
Jun 2007
Posts:
6
Plugin Contributions:
0

Re: i need help with categories TABLE

here is an image of the table

11 Jun 2007, 9:48 PM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: i need help with categories TABLE

CREATE TABLE cartcategories

cartcategories is not a default Zen Cart table???

But categories and products and others are all linked via "primary keys" and I would suspect that these are missing or not matching....

If you have cPanel and/or phpmyadmin - I suggest that after you square this that you begin making normal(not csv) backups of your DB and always a fresh one before you do anything to the DB

EP is not a DB backup tool and I do not believe that it captures all the fileds - just the ones that it requires

12 Jun 2007, 2:34 AM
#6
hammertime avatar

hammertime

New Zenner

Join Date:
Jun 2007
Posts:
6
Plugin Contributions:
0

Re: i need help with categories TABLE

i add that prefitx to all my tables to identify them

but all links are there and cant make it work

any other ideas?

thanks

12 Jun 2007, 3:46 AM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: i need help with categories TABLE

Do you have a Full Database Backup?

12 Jun 2007, 1:18 PM
#8
hammertime avatar

hammertime

New Zenner

Join Date:
Jun 2007
Posts:
6
Plugin Contributions:
0

Re: i need help with categories TABLE

no i dont have a full backup thats the bad thing.

12 Jun 2007, 3:25 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: i need help with categories TABLE

What is the name of your products table?
Is it products? Or cartproducts? Or cart_products?

What is the name of your admin table?
Is it admin? Or cartadmin? Or cart_admin?

12 Jun 2007, 8:43 PM
#10
hammertime avatar

hammertime

New Zenner

Join Date:
Jun 2007
Posts:
6
Plugin Contributions:
0

Re: i need help with categories TABLE

cartadmin,cartproducts

13 Jun 2007, 3:58 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: i need help with categories TABLE

And in your file:
/includes/configure.php

The DB_PREFIX reads:

define('DB_PREFIX', 'cart');

Do your two tables:
cartcategories
cartcategories_description

Have the same number of records?

Does the table:
cartproducts_to_categories

reference your products_id and categories_id that match your categories and products tables?