Zen Cart Logo

Default Product Types

Views: 781

Results 1 to 2 of 2
29 Jul 2012, 3:28 AM
#1
whitedragon551 avatar

whitedragon551

New Zenner

Join Date:
Jul 2012
Posts:
3
Plugin Contributions:
0

Default Product Types

I accidentally deleted the default product types and dependencies from the product_type table in mysql database. Does anyone have the SQL code to recreate that table? If not how can I fix this without reconfiguring my entire site? I spent all day working on it.

At this point I cant edit existing products without an error:

Not Found

The requested URL /admin/.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

29 Jul 2012, 1:59 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Default Product Types

Backup your database ...

If it was just the table product_types that you emptied, then, you should be able to rebuild the table product_types with:

#
# Table structure for table 'product_types'
#

DROP TABLE IF EXISTS product_types;
CREATE TABLE product_types (
  type_id int(11) NOT NULL auto_increment,
  type_name varchar(255) NOT NULL default '',
  type_handler varchar(255) NOT NULL default '',
  type_master_type int(11) NOT NULL default '1',
  allow_add_to_cart char(1) NOT NULL default 'Y',
  default_image varchar(255) NOT NULL default '',
  date_added datetime NOT NULL default '0001-01-01 00:00:00',
  last_modified datetime NOT NULL default '0001-01-01 00:00:00',
  PRIMARY KEY  (type_id),
  KEY idx_type_master_type_zen (type_master_type)
) ENGINE=MyISAM;
INSERT INTO product_types VALUES (1, 'Product - General', 'product', '1', 'Y', '', now(), now());
INSERT INTO product_types VALUES (2, 'Product - Music', 'product_music', '1', 'Y', '', now(), now());
INSERT INTO product_types VALUES (3, 'Document - General', 'document_general', '3', 'N', '', now(), now());
INSERT INTO product_types VALUES (4, 'Document - Product', 'document_product', '3', 'Y', '', now(), now());
INSERT INTO product_types VALUES (5, 'Product - Free Shipping', 'product_free_shipping', '1', 'Y', '', now(), now());