hi,
is it possible to convert product name URL into all small caps?
example:
Product-Name-Model123.html into product-name-model1123.html
PRODUCTNAME.html into productname.html
thank you
thanks david,
had a minor issue with product page.
the "review this product" link and the "Related Products" is still showing a
Product-Name.html URL
thanks.
David
Apart from the product name is it possible to code the description to show lower case only.
Chris
Hi Chris,
It would be best to do this during import rather than have to strtolower each place in the code where the description is displayed.
To do this; look for the following code in includes/admin.php (line 161):
if ($admin_importFeed["field_description"])
{
...and add the following line:
$record[$admin_importFeed["field_description"]] = strtolower($record[$admin_importFeed["field_description"]]);
You will need to import again before the change takes effect.
Cheers,
David.
David
That should do the trick (my php for dummies did not suggest that!)
Many thanks
Chris
Hiya,
This should work ok. The product name is written into the URL on line 143 of search.php as follows:
$searchresults["products"][$k]["productHREF"] = "product/".tapestry_hyphenate($product["name"]).".html";
You can add a strtolower() here as follows:
$searchresults["products"][$k]["productHREF"] = "product/".tapestry_hyphenate(strtolower($product["name"])).".html";
The other place you would need to do this is in sitemap.php, line 24:
$sitemapHREF = "product/".urlencode(str_replace(" ","-",$row["name"])).".html";
...change to:
$sitemapHREF = "product/".urlencode(strtolower(str_replace(" ","-",$row["name"]))).".html";
That should do the trick.
Cheers,
David.