the code that is under

http://www.zen-cart.com/forum/showth...aster+category

does not help the cPath is still appended have you any idea?

that code is :

/ first, try to get master category id
$category_query = "select p2c.categories_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
where p.products_id = '" . (int)$products_id . "'
and p.products_status = '1'
and p.products_id = p2c.products_id and p.master_categories_id = p2c.categories_id";
// in case the master category is invalid, fall back on getting first product/category association instead
$category_query .= " union distinct select p2c.categories_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
where p.products_id = '" . (int)$products_id . "'
and p.products_status = '1'
and p.products_id = p2c.products_id limit 1";

(additions to original code in red)

But (I'm on 1.3.9) in functions_categories.php
I'v got:
$category_query = "select p.products_id, p.master_categories_id
from " . TABLE_PRODUCTS . " p
where p.products_id = '" . (int)$products_id . "' limit 1";

So tell me how that "fix" is supose to help if "oryginaly" master_categories_id is taken from products table??




Quote Originally Posted by conor View Post
Hi,



Please search this thread for cPath and read my last few posts about such issues.

I'll have to make this into a FAQ!

All the best..

Conor
ceon

Hi Conor
I totally understand this must be a frustration, but please make it idiot proof for me...
Ive searched the thread as you can tell by the above quotes, Ive read rhe old 'how to' post on resolving, but I too have come up against the same issue as alarmy-e.pl, I cannot find the answer to how to mod the code for 1.3.9.
Sorry to be a plank.
Thanks in advance.