Hi Breeze,
I have question about linked products. Your code from post http://www.zen-cart.com/forum/showpo...4&postcount=58 not working.
You have
Code:
if ($str_pos_p2c!==false) {
but from post by Lenny is
Code:
if ($str_pos_p2c!=true) {
and without error.
Is good this in file catalog/includes/functions/extra_functions/cat_filter.php?
around line 15 replace
Code:
$str_pos_products = strpos($sql_lower,TABLE_PRODUCTS . ' p');
with
Code:
$str_pos_products = strpos($sql_lower,TABLE_PRODUCTS . ' p');
$str_pos_p2c = strpos($sql_lower,TABLE_PRODUCTS_TO_CATEGORIES . ' p2c');
around line 91 replace
Code:
$sql = substr($sql,0,$add_pos).
" INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
ON (p.master_categories_id = cd.categories_id
AND cd.language_id=".$_SESSION['languages_id']."
AND cd.categories_description LIKE '%-".SITE_NAME."-%') ".
substr($sql,$add_pos);
with:
Code:
if ($str_pos_p2c!=true) {
$sql = substr($sql,0,$add_pos).
" INNER JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." p2c ON (p2c.products_id=p.products_id)
INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
ON (p2c.categories_id = cd.categories_id
AND cd.language_id=".$_SESSION['languages_id']."
AND cd.categories_description LIKE '%-".SITE_NAME."-%') ".
substr($sql,$add_pos);
} else {
$sql = substr($sql,0,$add_pos).
" INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
ON (p.master_categories_id = cd.categories_id
AND cd.language_id=".$_SESSION['languages_id']."
AND cd.categories_description LIKE '%-".SITE_NAME."-%') ".
substr($sql,$add_pos);
}
!!!!! or with !!!!!
Code:
if ($str_pos_p2c!==false) {
$sql = substr($sql,0,$add_pos).
" INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
ON (p2c.categories_id = cd.categories_id
AND cd.language_id=".$_SESSION['languages_id']."
AND cd.categories_description LIKE '%-".SITE_NAME."-%') ".
substr($sql,$add_pos);
} else {
$sql = substr($sql,0,$add_pos).
" INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
ON (p.master_categories_id = cd.categories_id
AND cd.language_id=".$_SESSION['languages_id']."
AND cd.categories_description LIKE '%-".SITE_NAME."-%') ".
substr($sql,$add_pos);
}
Work this patch?