When I created my products and mapped them I used capitals i.e. James Wellbeloved Adult Lamb and Rice 15Kg
I still want this on the page and as the H1 which we have now
But I want lower case in my URL, can this be done?
Thanks
Stuart
Hi David,
I have been wrestling with this problem, so I must be doing something wrong. I first tried using this edit in tapestry.php and it does give me lower case URLs, but titles, (uses titles) and descriptions are all lower case also and I don't want that.
I tried using the lowercasepatch.zip, but it does the same thing. I am going to go back to original versions of tapestry.php, reviews.php and products.php and came here to ask if there is an edit that will only change the URLs. If not, I will learn to get along with upper case URLs.
Thank you
Hi,
I did just double check the patch that I sent to you on my test server, but perhaps if you'd like to try the changes one step at a time; first of all, in includes/tapestry.php look for the following code at line 69:
return $config_baseHREF."product/".urlencode(tapestry_hyphenate($product["normalised_name"])).".html";
...and REPLACE with:
return $config_baseHREF."product/".urlencode(tapestry_hyphenate(strtolower($product["normalised_name"]))).".html";
And then in products.php, let's concentrate on the title first (browser title bar, so <title> title tag in the head) in products.php look for the following code, also at line 69:
$header["title"] = $q;
...and REPLACE with:
$header["title"] = $product["products"][0]["name"];
If all good, let me know and i'll post the final changes for description...
Cheers,
David.
--
PriceTapestry.com
Hi David,
I don't know if my previous problems were due to cache, because I repeated the same uploading today, after verifying the lines shown above, (which were as shown here) and it is definitely doing what it is supposed to do for the product pages now. Thank you!
Hi Stuart,
Sure - you can make the change in a single location - in includes/tapestry.php look for the following code at line 53:
return $config_baseHREF."product/".urlencode(tapestry_hyphenate($product["normalised_name"])).".html";
...and REPLACE with:
return $config_baseHREF."product/".urlencode(tapestry_hyphenate(strtolower($product["normalised_name"]))).".html";
Cheers,
David.
--
PriceTapestry.com