Hello David
I've got a new version of price tapestry involved and when I've installed a feed I've noticed the product name showings the apostrophe '
Where/how does this get stripped? I don't think its working at the moment.
Thanks Mally
Hello David
Thansk for the above.
I installed the new version, but added an old template of mine.
Is there an easy way to modify my old template to make the urls work with the ' and other characters that may be in the product name? thanks Mally
Hi Mally,
It sounds like the template may be using the product name within attributes etc. where the apostrophe is interfering with the HTML. To fix this; wherever you have, for example:
print $product["name"];
...change it to:
print htmlentities($product["name"],ENT_QUOTES,$config_charset);
That should be all it is...
Cheers,
David.
Hi David
Still got an issue. The site I'm talking about is mountain bike
See this page to see some of the errors. http://www.mountainbike.co.uk/category/BikesBike-Wheels-Tyres-amp-Inner-TubesBike-Wheels-Rim-tape/ The main issue is the url is actually not working.
Hi Mally,
Ah - they're entity encoded rather than appearing literally, however they should still display correctly. Could you please email from that site:
search.php
products.php
html/searchresults.php
..and I'll check it out...
Cheers,
David.
Hi Mally,
The new version holds both the full name (which can contain the apostrophes) and a URL safe version from which the apostrophe will be stripped. If you don't want it included in the display version, you could use a Search and Replace filter on the Product Name field, or alternatively to globally remove apostrophes for all feeds, look for the following comment on line 186 of includes/admin.php:
/* apply user filters */
...and ADD the following code immediately prior to that point:
$importRecord["name"] = str_replace("'","",$importRecord["name"]);
Hope this helps!
Cheers,
David.