While this mod doesn't deal with the way the system stores the URLs or cross links within the store, it does mean that you can put in place links to your products that use the productid rather than the name, making it a bit easier not to be caught out.
Open: includes/classes/class.product.php
Find:
Code: Select all
public function _SetProductData($productid=0)
{
Code: Select all
//MOD Accept Productid as arg for product link
/*
* Allows the use of products.php?productid=xx as a link that then links
* to the name product url regardless of any product name changes
*/
if(array_key_exists('productid', $_REQUEST) && $_REQUEST['productid'] > 0) {
$productid = intval($_REQUEST['productid'])* 1;
require_once ISC_BASE_PATH . "/lib/class.urls.php";
header('Location: '.ISC_URLS::getProductUrl($productid));
}
//MOD END Accept Productid as arg for product link
http:// www. yoursite .com/products.php?productid=[productid_value]
The productid value is the one used in your products database or easily identified if you go into the admin > Products and mouseover the "edit" link for your target product (eg: http:// www. yoursite .com/admin/index.php?ToDo=editProduct&productId=393)
The code then looks up the normal product URL and redirects the browser to load the page as it would normally so the end user will have the standard URL shown in their browser address bar rather than a non-SEO link.