Hi David
Change Product URL format like
example.com/books/(isbn no ) example.com/books/43888999992
I already created ISBN13 Numbers field
Thanks Amin
Hi Amin
Sure - whenever changing product URLs, there are just 3 considerations:
1) .htaccess
Look for the following rule at line 7:
RewriteRule ^product/(.*).html$ products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
...and REPLACE with:
RewriteRule ^books/(.*)$ products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
2) tapestry_productHREF() function in includes/tapestry.php
Look for the following code at line 53:
return $config_baseHREF."product/".urlencode(tapestry_hyphenate($product["normalised_name"])).".html";
return $config_baseHREF."books/".urlencode(tapestry_hyphenate($product["isbn13"]));
3) SELECT SQL in products.php based on new key
Look for the following code at line 12:
$sql = "SELECT * FROM `".$config_databaseTablePrefix."products` WHERE normalised_name = '".database_safe($q)."'";
$sql = "SELECT * FROM `".$config_databaseTablePrefix."products` WHERE isbn13 = '".database_safe($q)."'";
Cheers, David. -- PriceTapestry.com
©2006-2025 IAAI Software | Contact Us | Privacy Policy
Hi Amin
Sure - whenever changing product URLs, there are just 3 considerations:
1) .htaccess
Look for the following rule at line 7:
RewriteRule ^product/(.*).html$ products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
...and REPLACE with:
RewriteRule ^books/(.*)$ products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
2) tapestry_productHREF() function 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."books/".urlencode(tapestry_hyphenate($product["isbn13"]));
3) SELECT SQL in products.php based on new key
Look for the following code at line 12:
$sql = "SELECT * FROM `".$config_databaseTablePrefix."products` WHERE normalised_name = '".database_safe($q)."'";
...and REPLACE with:
$sql = "SELECT * FROM `".$config_databaseTablePrefix."products` WHERE isbn13 = '".database_safe($q)."'";
Cheers,
David.
--
PriceTapestry.com