Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Help: Invalid Master Category

Help: Invalid Master Category

Locked

Views: 7,348

Results 1 to 20 of 35
This thread is locked. New replies are disabled.
28 Dec 2006, 2:51 AM
#1
rebecca_lynn avatar

rebecca_lynn

New Zenner

Join Date:
Nov 2006
Posts:
5
Plugin Contributions:
0

Help: Invalid Master Category

when I link a product to a another category I don't get master category in the dropdown menu instead I get invalid master category. I am using 1.3.6 I did not upgrade.. I use the admin area to add the products. When I delete the link it is back to normal..

I am not sure what to do any help would be great...

Rebecca

28 Dec 2006, 3:31 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Help: Invalid Master Category

Did you ever have master_categories_id set in the products table?

Check your database via phpMyAdmin and browse the products table ...

Do you see the master_categories_id with blank or 0 ... or do you see a value in it?

NOTE: A lot of sites that use Import programs do not have this set ...

This can be fixed but it helps to have a bit more detail on how you add your products to start with ...

28 Dec 2006, 4:02 AM
#3
rebecca_lynn avatar

rebecca_lynn

New Zenner

Join Date:
Nov 2006
Posts:
5
Plugin Contributions:
0

Re: Help: Invalid Master Category

I do not use any import programs. When adding a new product I go to admin catergory/product and add them that way.

I went to my phpMyAdmin and went to products clicked on browse and where it says master_categories_id it has different numbers in the table.

28 Dec 2006, 4:12 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Help: Invalid Master Category

I am not picturing how you are getting this error ...

You are in a Category of Products and decide to Link a Product to another Category ...

You click Copy as Linked Product ...

You pick the Category to Copy it to ... as a Linked Product ...

You then do what to see that this is not working right?

28 Dec 2006, 4:17 AM
#5
rebecca_lynn avatar

rebecca_lynn

New Zenner

Join Date:
Nov 2006
Posts:
5
Plugin Contributions:
0

Re: Help: Invalid Master Category

What I am trying to do is have a sale on just one manufactor and when I link it to the manufactor own catergory where I can set it for the sale. I try to make it the master catergory but it want let me because in the drop down menu it has Invalid Master Category

28 Dec 2006, 4:22 AM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Help: Invalid Master Category

When you are trying to change the master_categories_id ... you do not do this via an Edit of the Product ...

That only lets you change which one of a Product's "existing" Linked Categories is the Master Category ...

To change it to a Category that the Product is not already Linked to, you could use the Multiple Categories Link Manager that is shown when you hit C for Copy ...

This will let you manage the Categories that a Product belongs to ... it also lets you change which is the Master Category so that the master_categories_id is correct for sales and such ...

You can also get all the Products Linked to that new manufactuers category that you made and then, using the Multiple Categories Link Manager there is a setting for changing all products in a given Category to use that Category as the Master Categories ID ...

28 Dec 2006, 4:48 AM
#7
rebecca_lynn avatar

rebecca_lynn

New Zenner

Join Date:
Nov 2006
Posts:
5
Plugin Contributions:
0

Re: Help: Invalid Master Category

Thank you Thank you Thank you. I did it the way you said to and I got it..Thank you so much

28 Dec 2006, 4:57 AM
#8
ajeh avatar

ajeh

Oba-san

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

Re: Help: Invalid Master Category

You are most welcome ... glad that this helped you out ... :smile:

28 Feb 2007, 10:58 PM
#9
tvadpro avatar

tvadpro

Zen Follower

Join Date:
Aug 2005
Location:
Cincinnati
Posts:
323
Plugin Contributions:
0

Re: Help: Invalid Master Category

Maybe this is an Easy Populate question & I should post there -- I dunno. :unsure:

I'm running ZC 1.3.7 with Easy Populate. Product 177 has master category 74 (Wooden playhouses), and is linked into category 73 (Driftwood 10x8 shed kit). The master and linked categories were originally 73 and 74, but I reversed them.

When viewing product 177 in the catalog, it still behaves as if its master category were 73.

See for yourselves: it's the Driftwood wooden playhouse.

Given its master category is now 74, I thought the breadcrumbs should look like
**
Home | Wooden playhouses | Driftwood wooden playhouse kit**

instead of

Home | Shed kits | Driftwood 10x8 shed kit | Driftwood wooden playhouse kit

... and the return-to-product-list button should link to the master category (Wooden playhouses) instead of the linked category (Driftwood 10x8 shed kit).

I browsed zen_products and zen_products_to_categories, and 177 has 74 as its master in both (until I reset master category IDs).

Tried resetting master category IDs in Store Manager, but this changes 177's master category from 74 back to 73. Why does it do that? Is there another table identifying the master category as 73 -- one which is unaffected by changing the master category ID in the admin? :wacko:

To add insult to confusion, I looked at Easy Populate in the admin. A warning notified me that 2 partially deleted products were found. Prompted me to for a click to clean up the dross; I obliged, it failed -- and suggested I look at the log in the uploads directory.

Am I overlooking something obvious?
Sean

1 Mar 2007, 3:08 AM
#10
tvadpro avatar

tvadpro

Zen Follower

Join Date:
Aug 2005
Location:
Cincinnati
Posts:
323
Plugin Contributions:
0

Re: Help: Invalid Master Category

No idea whether the master category ID glitch and the Easy Populate glitch are related, but I looked at the East Populate error log, and it specified two products_id values that turned up in the customers_basket_attributes and customers_basket tables. The error log recommended deleting these from the database, but I hesitate to delete anything without knowing whether doing so will cause other problems. Can anyone who is familiar with customers_basket and customers_basket_attributes tables comment? :lookaroun

1 Mar 2007, 4:21 AM
#11
tvadpro avatar

tvadpro

Zen Follower

Join Date:
Aug 2005
Location:
Cincinnati
Posts:
323
Plugin Contributions:
0

Re: Help: Invalid Master Category

I tracked down table_customers_basket_attributes and table_customers_basket in the following files:

admin/customers.php
admin/includes/functions/extra_functions/easypopulate_functions.php
admin/includes/functions/general.php
includes/classes/shopping_cart.php
includes/database_tables.php
includes/functions/functions_customers.php
includes/modules/payment/paypalwpp.php

In the tables themselves, I noticed some of the products_id values are simple product numbers (e.g. "105") while others have an appendage consisting of a colon ( : ) followed by a few dozen characters (0 - 9, a - f) that vaguely resemble a session ID. The short values are recent.

I migrated this site about a month ago from another server, doing a clean install and then importing the database via phpMyAdmin. Maybe something got botched during the import?

1 Mar 2007, 4:31 AM
#12
tvadpro avatar

tvadpro

Zen Follower

Join Date:
Aug 2005
Location:
Cincinnati
Posts:
323
Plugin Contributions:
0

Re: Help: Invalid Master Category

Okay -- I grew myself a pair and deleted the rows in question from table_customers_basket_attributes and table_customers_basket. Apparently no harm done, and the Easy Populate warning regarding partially-deleted products is gone.

Now if I can just get the catalog to recognize master categories correctly ... :sleepy:

1 Mar 2007, 2:57 PM
#13
tvadpro avatar

tvadpro

Zen Follower

Join Date:
Aug 2005
Location:
Cincinnati
Posts:
323
Plugin Contributions:
0

Re: Help: Invalid Master Category

Well, it's a new day, so let's try again.

Can anyone suggest a reason why my Zen-Cart would act as if a product's master category were something other than what it is?

Seriously. :dontgetit
Sean

1 Mar 2007, 3:18 PM
#14
ajeh avatar

ajeh

Oba-san

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

Re: Help: Invalid Master Category

Look in your products table via phpMyAdmin at the master_categories_id for the Products ...

They should exist as categories_id in the categories table ...

They should exist as categories_id in the products_to_categories table for their respective products ...

They should be seen if you edit the Product in the Catalog ... Categories/Products ...

They should NOT be 0 ...

You should NOT see Invalid Mastere Category ID selected when you edit the Product ...

1 Mar 2007, 3:40 PM
#15
tvadpro avatar

tvadpro

Zen Follower

Join Date:
Aug 2005
Location:
Cincinnati
Posts:
323
Plugin Contributions:
0

Re: Help: Invalid Master Category

master_categories_id is correct in table products? Yes.
categories_id correct in table categories? Yes.
categories_id correct in table products_to_categories? Yes.
Product Master Category correct in Categories-Products/Edit Product? Yes.

Thanks Linda. I just re-checked all of the conditions you listed, and everything is as it should be -- yet my catalog still behaves as if the master category for p177 were 73 instead of 74. It's as if my catalog were living in the past or something.

What else could it be? And why would Reset ALL Products Master Categories ID (in Store Manager) cause the master category to change from 74 to 73?

Sean

Ajeh:

Look in your products table via phpMyAdmin at the master_categories_id for the Products ...

They should exist as categories_id in the categories table ...

They should exist as categories_id in the products_to_categories table for their respective products ...

They should be seen if you edit the Product in the Catalog ... Categories/Products ...

They should NOT be 0 ...

You should NOT see Invalid Mastere Category ID selected when you edit the Product ...

1 Mar 2007, 4:54 PM
#16
ajeh avatar

ajeh

Oba-san

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

Re: Help: Invalid Master Category

The Reset of the master_categories_id takes the first categories_id found for the product in the products_to_categories table and makes that the master_categories_id ...

It doesn't know right from wrong ... only you do ...

If you edit the Product ... which is marked as the master_categories_id in the dropdown? You should see both, and the master should be selected ...

Check the products_to_categories table for the products_id with the problem ...

Does it only list those two?

1 Mar 2007, 5:11 PM
#17
tvadpro avatar

tvadpro

Zen Follower

Join Date:
Aug 2005
Location:
Cincinnati
Posts:
323
Plugin Contributions:
0

Re: Help: Invalid Master Category

Thanks Linda -- yes, products_to_categories lists only 73 and 74 for p177. And when I look at the Product Master Category in the product editor dropdown, it shows 74 selected. If I click the dropdown, the selections are (top-to-bottom) invalid master category ID, 73, and 74.

I tried reversing 177 - 73 and 177 - 74, but the revised products_to_categories table still sequences 177 - 73 above 177- 74.> Ajeh:

The Rest of the master_categories_id takes the first categories_id found for the product in the products_to_categories table and makes that the master_categories_id ...

It doesn't know right from wrong ... only you do ...

If you edit the Product ... which is marked as the master_categories_id in the dropdown? You should see both, and the master should be selected ...

Check the products_to_categories table for the products_id with the problem ...

Does it only list those two?

1 Mar 2007, 5:19 PM
#18
ajeh avatar

ajeh

Oba-san

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

Re: Help: Invalid Master Category

What does the dropdown read if you click Edit on the Product without touching anything else?

1 Mar 2007, 5:22 PM
#19
tvadpro avatar

tvadpro

Zen Follower

Join Date:
Aug 2005
Location:
Cincinnati
Posts:
323
Plugin Contributions:
0

Re: Help: Invalid Master Category

It reads 74 -- as it should. But catalog treats this product as if its master category were 73.> Ajeh:

What does the dropdown read if you click Edit on the Product without touching anything else?

1 Mar 2007, 5:24 PM
#20
ajeh avatar

ajeh

Oba-san

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

Re: Help: Invalid Master Category

Click on the C for Copy on this product and select the button for Multiple Categories Link Manager ...

Uncheck the Category that is NOT the master_categories_id ...

Click Update Category Links ...

Now re-select the Category you just unchecked ...

NOTE: only Categories with at least 1 product will show on this listing ...