Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 07-06-2009 10:42:06

rapport
Member
Registered: 07-06-2009
Posts: 1

A Few Problems

Hello
I'm trying to delete categories and create new ones.  However, I keep getting this error:

ERROR: The primary key for the item you selected could not be located in the database. Please try again.


Additionally, I'm trying to place products under specific categories and I can't seem to find how to do this.  Can someone help me? Thanks.

Offline

 

#2 07-06-2009 12:43:16

crasher999999
Member
From: Deepest, Darkest Suffolk!!!
Registered: 12-30-2005
Posts: 28

Re: A Few Problems

Re: 'ERROR: The primary key for the item you selected could not be located in the database. Please try again'

I had a similar problem a while ago. The error was caused because I copied & pasted the Category Reference String, but (unknown to me at the time!!), I had copied a space before the reference string (e.g. ' my-cat' instead of 'my-cat'), when the cat was added to the database, the space was filled with odd characters by ccp (which resulted in the error)!

To fix it...........

Swap your file back to CSV mode from MYSQL (if you've changed them over).....From the drop down bar on the left, database utilities>Manage Table Data Sources

Download your category.csv via FTP (CCP51>Data>Tables>category.csv)

MAKE A BACK UP COPY OF CATEGORY.CSV!!!!!!!

Open the category.csv file with notepad or a similar text editor

Each category should look something like (e.g.):

my-cat    My Cat Title    N    my-cat-pic.gif    3    ste_cat_default    4    ste_prodsm_default    N    PCT    0        Brief description of my cat (if added)

Look for categories where the reference string has odd characters before it (e.g.):

!>@??my-cat    My Cat Title    N    my-cat-pic.gif    3    ste_cat_default    4    ste_prodsm_default    N    PCT    0        Brief description of my cat (if added)

The odd characters may be in the middle of the ref string, depending on where you have the space (e.g. 'my!>@??cat' instead of 'my-cat')

Delete the odd characters from the category reference string (you may need to call the ref string something slightly different, so you don't get 2 ref strings the same, e.g. my-cat255 instead of my-cat. I also changed the cat names to 'DELETE ME', so it was easy to find in CCP admin), then save & upload the file in text format (I seem to remember that if you delete the whole cat/line from the CSV file it may cause an error, it's easier to correct the cat reference string & delete it through CCP admin if needed).

It was a few years ago it happened to me, so I can't exactly remember what the 'odd characters' were (but if you search the page for the cat reference string, you should find it!)

To add products to categories:

Go to the 'Manage Products' page in CCP admin (from the drop down bar on the left: Store Catalog>Manage Products), choose the product you want to edit & click Update, at the bottom of the product update page in the box just below where it says: 'Related Categories (This Product is displayed in these Categories)', add the categories you want the product to appear in CSV format (e.g.):

If you want the item to appear in 1 cat insert your cat reference string into the box (e.g. my-cat-ref-string), if you want it displayed in more than 1 category, insert the categories with a comma between each one (e.g. my-cat-ref-string,my-other-cat-ref...etc), click on 'submit' at the bottom of the page & the products should appear in the categories.


Clear as mud......................

Offline

 

Board footer