You are here:  » Full Stop In Product Name

Support Forum



Full Stop In Product Name

Submitted by johnc on Thu, 2010-05-20 17:38 in

Hi David

I'm very new to PriceTapestry and have been doing okay but I've encountered what is probably a common issue.

Some product names in the data feed have a full stop in them eg: Blue X.7 Widget

When Blue X.7 Widget appears as the featured product, when I click it the URL referenced (www.example.co.uk/blue-x.7-widget.html) contains the embedded full stop and I guess creates a 404 error ..so I get a product not found message.

I do note that the suggested related products shown on the resultant product not found page include product names with embedded full stops but the URL for such related products does not include an embedded full stop?

So, how do filter out any embedded full stop (or other special characters) from the product name?

Cheers

John

Submitted by support on Thu, 2010-05-20 18:10

Hello John,

Would you have implemented the random Featured Products modification? There is a forum post regarding this update for the latest distribution here, however there are earlier versions that relate to when Price Tapestry did not hold separate values for the display and URL version of the name. It sounds like in your index.php, the feature products URLs are being generated using

tapestry_hyphenate($product["name"])

Try searching exactly for the above in your index.php (it appears twice, once fof the product link and once of the review link), and if that's the case, REPLACE each instance with:

tapestry_hyphenate($product["normalised_name"])

If that doesn't seem to be the problem, if you could email me your index.php and html/featured.php i'll check it out for you...

Hope this helps!

Cheers,
David.

Submitted by johnc on Fri, 2010-05-21 11:14

Hi David

Yep - I'm using the random featured products mod.

The mod you suggested has fixed the problem.

Thanks

John