You are here:  » Hyphens In Product Name 2


Hyphens In Product Name 2

Submitted by endurado on Mon, 2013-12-30 14:19 in

Hello David,

Some of my Product names contain hyphen and these disappear in the headline on the product page, because it is derived from the URL ($q in products.php). I don't know if there is an easy solution as some hyphens have to be removed from URL, others that are in product name should not be removed. Maybe it is possible to set the headline value ($banner["h2"])from database productsmap table, field name instead of URL?

Thanks and a happy new year,
Sven

Submitted by support on Mon, 2013-12-30 15:06

Hello Sven,

No problem, for title, and use anywhere in meta keywords / descriptions / $banner["h2"] in place of

$q

...use:

$product["products"][0]["name"]

...and that will be the full original, non-normalised name.

Cheers,
David.
--
PriceTapestry.com

Submitted by endurado on Tue, 2013-12-31 08:34

Hello David,

thanks a lot, it works. Just in case, someone else wants to change this:

The $banner["h2"] value assignment has to be moved down in the file behind the $product line like this:

      $product["products"] = $rows;
      $banner["h2"] = "<strong>".htmlspecialchars($product["products"][0]["name"])."</strong>&nbsp;";

Sven

P.S. It doesn't work for amazon as cheapest merchant in my special configuration but there are many more things to be solved for this case.