There seems to be a bug in the script causing a blank page, but it only affects stores using a database prefix because the table names are hard coded.
Here's the solution. Edit includes/classes/seo.url.php file as follows:
find (line 613)
Code:
/* START SEO-ADD-PRODUCT-CAT PATCH
*
* Patched to use SEO_ADD_PRODUCT_CAT
* This allows the use of a directory structure for urls.
* @author Andrew Ballanger
*/
if($this->attributes['SEO_ADD_PRODUCT_CAT'] == 'true')
{
$sql = 'SELECT pd.products_name AS pName, ptc.categories_id AS c_id ' .
'FROM products_description AS pd ' .
'LEFT JOIN products AS p ' .
'ON pd.products_id=p.products_id ' .
'LEFT JOIN products_to_categories AS ptc ' .
'ON pd.products_id=ptc.products_id ' .
'WHERE pd.products_id=\'' . (int)$pID . '\' ' .
'AND language_id=\'' . (int)$this->languages_id . '\' LIMIT 1';
}
and replace with:
Code:
/* START SEO-ADD-PRODUCT-CAT PATCH
*
* Patched to use SEO_ADD_PRODUCT_CAT
* This allows the use of a directory structure for urls.
* @author Andrew Ballanger
*/
if($this->attributes['SEO_ADD_PRODUCT_CAT'] == 'true')
{
$sql = 'SELECT pd.products_name AS pName, ptc.categories_id AS c_id ' .
'FROM ' . TABLE_PRODUCTS_DESCRIPTION . ' AS pd ' .
'LEFT JOIN ' . TABLE_PRODUCTS . ' AS p ' .
'ON pd.products_id=p.products_id ' .
'LEFT JOIN ' . TABLE_PRODUCTS_TO_CATEGORIES . ' AS ptc ' .
'ON pd.products_id=ptc.products_id ' .
'WHERE pd.products_id=\'' . (int)$pID . '\' ' .
'AND language_id=\'' . (int)$this->languages_id . '\' LIMIT 1';
}
find (line 825)
Code:
function get_parent_categories_path(&$path, $categories_id, &$cPath = array())
{
$sql = 'SELECT c.parent_id AS p_id, cd.categories_name AS name ' .
'FROM categories c ' .
'LEFT JOIN categories_description cd ' .
'ON c.categories_id=cd.categories_id ' .
'AND cd.language_id=\'' . (int)$this->languages_id . '\'' .
'WHERE c.categories_id=\'' . (int)$categories_id . '\'';
$parent = $this->db->Execute($sql, false, true, 43200);
and replace with
Code:
function get_parent_categories_path(&$path, $categories_id, &$cPath = array())
{
$sql = 'SELECT c.parent_id AS p_id, cd.categories_name AS name ' .
'FROM ' . TABLE_CATEGORIES . ' c ' .
'LEFT JOIN ' . TABLE_CATEGORIES_DESCRIPTION . ' cd ' .
'ON c.categories_id=cd.categories_id ' .
'AND cd.language_id=\'' . (int)$this->languages_id . '\'' .
'WHERE c.categories_id=\'' . (int)$categories_id . '\'';
$parent = $this->db->Execute($sql, false, true, 43200);
Changes are highlighted in red. Hope it helps...
Bookmarks