Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding categories via phpmyadmin


vladimir_ivanov2

Recommended Posts

hi, im preparing a site for car spare parts dealer. he have a lots of categories.

i just add it via phpmyadmin. the problem is that in the backend/frontend i can see only the parents categories - CANT SEE THE SUBCATEGORIES!!!

 

i use these scripts to made the subcategories:

 

1. for table categories

 

INSERT INTO `categories`

( `categories_id` , `categories_image` , `parent_id` , `sort_order` , `date_added` )

VALUES

('105', 'sin_foto.gif', '23', '0', '06/07/2005 21:39');

 

2. for table categorie_description

 

INSERT INTO `categories_description`

( `categories_id` , `language_id` , `categories_name` )

VALUES

('105', '23', '145');

 

in the example im truyng to build a subcategory named 145 with parent category 23. the script is working. in phpmyadmin i can see all the categories and subcategories.

 

CANT SEE THE SUBCATEGORIES!!!

what i am doing wrong???

 

please help

thanks in advance

vladimir

Link to comment
Share on other sites

Any particular reason you're not using the osC admin? You're probably missing something that needs to get added into the db, and could figure it out if necessary, but the osC admin works just fine . . .

 

-jared

Link to comment
Share on other sites

Any particular reason you're not using the osC admin?  You're probably missing something that needs to get added into the db, and could figure it out if necessary, but the osC admin works just fine . . .

 

-jared

 

 

there is a reason why - i have more than 400 categories (and sub categories).

thats why i decide tou run a sql script.

Link to comment
Share on other sites

there is a reason why - i have more than 400 categories (and sub categories).

thats why i decide tou run a sql script.

 

http://www.oscommerce.com/community/contributions,500

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

categories_description doesnt have parent id that is the language id so it will only show up for language id 23.

 

INSERT INTO `categories_description` 
( `categories_id` , `language_id` , `categories_name` ) 
VALUES 
('105', '23', '145');

 

For English

 

INSERT INTO `categories_description` 
( `categories_id` , `language_id` , `categories_name` ) 
VALUES 
('105', '1', '145');

Link to comment
Share on other sites

categories_description doesnt have parent id that is the language id so it will only show up for language id 23.

 

INSERT INTO `categories_description` 
( `categories_id` , `language_id` , `categories_name` ) 
VALUES 
('105', '23', '145');

 

For English

 

INSERT INTO `categories_description` 
( `categories_id` , `language_id` , `categories_name` ) 
VALUES 
('105', '1', '145');

 

ok, thanks - what a stupid typo from mi :blush:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...