You are here:  » Meta codes breaks on page 2


Meta codes breaks on page 2

Submitted by safari45 on Sat, 2021-03-13 07:31 in

Hi David

I have been battleing this for some time now I hope you could help me.These codes work on page 1 and break on page 2,3,... in search.php there are the following code:

        if ($rewrite)
{ switch($parts[0])
{ case "merchant":
$header["title"] = $parts[1]." - ".translate("All products by")." ".$parts[1]." ".translate("Shop")." | ".translate("main domain");
$header["meta"]["description"] = translate("Here is list all products offer by")." ".$parts[1].", ".translate("there are")." ".$resultCount." ".translate("products from")." ".$parts[1]." ".translate("for sale").", ".translate("All products are constantly updated by")." ". $parts[1];
$header["meta"]["keywords"] = $parts[1].", ".translate("products from")." ". $parts[1];
break;
        case "category":
$header["title"] = $parts[1]." - ".translate("More than")." ".$resultCount." ".$parts[1]." ".translate("for sale today")." | ".translate("main domain");
$header["meta"]["description"] = translate("Here is the great selection of")." ".$parts[1]." ".translate("in country with")." ".$resultCount." ".$parts[1]." ".translate("for sale").". ". $parts[1]." ".translate("is one of many categories on")." ".translate("main domain").", ".translate("Don't miss out to look through more categories with alot more products on")." ".translate("main domain");
$header["meta"]["keywords"] = $parts[1]." ".translate("for sale").", ".$parts[1];
break;
        case "brand":
$header["title"] = $parts[1]." - ".translate("New great selection by")." ".$parts[1]." | ".translate("main domain");
$header["meta"]["description"] = translate("Here is the great selection of")." ".$parts[1]." ".translate("products")." ".translate("in country with")." ".$resultCount." ".$parts[1]." ".translate("products")." ".translate("for sale").", ".translate("All")." ". $parts[1]." ".translate("products")." ".translate("are collected from shops across the country");
$header["meta"]["keywords"] = $parts[1].", ".$parts[1]." ".translate("products for sale");
        $banner["h1"] = translate("Product search results for")." <strong>".htmlspecialchars($q,ENT_QUOTES,$config_charset)."</strong>&nbsp;";
break;
}
}

I have tested in this the meta result the page 1 and 2 of the same category.
---------------------------------------------------------- page 1
{code saved}

------------------------------------------------------------page 2
{code saved}

Submitted by support on Mon, 2021-03-15 10:02

Hi,

That's strange - I can't immediately see why $parts[1] would contain the full URL encoded $q value in this context - please could you email me your modified search.php and I'll check it out further for you...

Thanks,
David.
--
PriceTapestry.com