Forums / All Other Contributions/Addons / Cpath incorrect on links to Subcategories from category page (hidden wholesale mod)

Cpath incorrect on links to Subcategories from category page (hidden wholesale mod)

Locked

Started by jackie_taferner on 2 Nov 2010, 5:55 PM · Views: 1,138

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
2 Nov 2010, 5:55 PM
#1
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Cpath incorrect on links to Subcategories from category page (hidden wholesale mod)

So, when I view a category, if I click the sub-category links in the left side menu, the cpath is correct. But if I click on the category image in the middle of the page, the cpath is incorrect.

Example:
Link to subcategory from the left sidebox: cPath=57_25 CORRECT
Link to subcategory from the middle images: cPath=25 INCORRECT

This gives rise to problems like breadcrumbs being inaccurate, subcategories not showing on left side while in subcategory, etc etc.

If I knew which file controls these links, I can fix it. But cant for the life of me find the file! where is it located?

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

2 Nov 2010, 6:17 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Cpath incorrect on links to Subcategories from category page (hidden wholesale mod)

The question has to be, what customization do you have that could affect the category listing? It works fine in my test site.

/includes/modules/your_template/category_row.php builds the subcat output.

3 Nov 2010, 3:05 PM
#3
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Cpath incorrect on links to Subcategories from category page (hidden wholesale mod)

Well, I've got hidden wholesale installed, so at this point I'm fairly sure that's what's causing it because I have another site running the same template except it's strictly retail - and doesn't have this problem.

I'm going to post in that thread and see if Kuroi can help out on this.

http://www.zen-cart.com/forum/showthread.php?t=133588

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

3 Nov 2010, 3:10 PM
#4
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Cpath incorrect on links to Subcategories from category page (hidden wholesale mod)

Whoop! I just fixed it :)

it was in includes/functions/category_functions.php

Changed this:
global $db, $custom_restriction; // kuroi: add $custom_restriction as a global var

To this:
global $cPath_array, $db, $custom_restriction; // kuroi: add $custom_restriction as a global var

I'll upload the fixed version to the downloads page.

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.