Zen Cart Logo
Forums / General Questions / cPath extension on Master Category

cPath extension on Master Category

Views: 1,115

Results 1 to 6 of 6
17 Apr 2011, 10:10 AM
#1
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

cPath extension on Master Category

Hi all!
I'm using Zen cart 1.3.8a and have been told this problem may be a known issue with Zen Cart prior to release 1.3.9.
I've looked through the known bugs for 1.3.8a but can't find a fix. I've also searched the forums but can't find anything there either.
It's making me think this may not be a known issue but something I've introduced with a mod :(
Unfortunately, nobody has been able to point me to a fix so I'm hoping someone here can help me!

The problem is with the cPath extension appended to the end of the product info page URL. It seems to be taking the lowest category ID as the master category, even though in admin, the master category ID is showing correctly against the product.

For example, I have a product that has a master category of 100.
If I link that product to another category with a higher number (say 120), everything still works as expected.....

When I visit the product page under the master category on my website, the URL has no cPath extension.
When I visit the product page under the linked category on my website, the URL does have the cPath extension. Nothing wrong here.

If I now link the product to a category with a LOWER number (say 80), I have a problem.....

When I visit the product page under the master category on my website, the URL now has a cPath extension.
When I visit the product page under the new linked category (category 80) on my website, the URL does not have the cPath extension.

In effect, it thinks category 80 is the master category when it is actually category 100.

Is this a known issue? If so, can you point me at a fix please?

17 Apr 2011, 10:43 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: cPath extension on Master Category

Not aware of this as an issue, but if it were the fix would be to upgrade to 1.3.9, which for security reasons you should do anyway.

However, I suspect that is more likely to be an issue with the URL rewriting package that you are using. Does the same thing happen if you disable it?

17 Apr 2011, 9:03 PM
#3
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: cPath extension on Master Category

Yeah, I thought the same thing myself but if I disable the URL rewrite mod the bug persists.

I've asked over at the mod forum (Ceon URI mapping) and nobody has come across this bug before so I think I can rule that one out.

I don't know where to go with this one now except renumber the linked category so it is higher than the master if that's possible?
Not much of a fix though, I know!

21 Apr 2011, 4:13 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: cPath extension on Master Category

Note: the problem was fixed in a simpler manner in v1.3.9 (probably 1.3.9a: functions_categories.php 14141 2009-08-10).

21 Apr 2011, 4:19 PM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: cPath extension on Master Category

Agree with Glenn. Congrats for finding the solution, but it's more convoluted than it needs to be. If the master cat is needed, quickest to just go to the product table and get it. No need for the products to cats table to be involved at all.

Also, sorry, but a good example of where it may have been quicker just to upgrade to the latest version of Zen Cart. You're going to need to do that sooner or later anyway.