I have this working now on 0.7.8 with Bruce's Sub category Code
After reading through the thread at
http://forum.opencart.com/index.php/topic,1677.0.html
In generate_url_alias.php I replaced
Code: Select all
/*generate categories & subcategories
$sql = "select c.parent_id, c.path, cd.name from category_description cd left join category c on (c.category_id = cd.category_id)";
$this->_generate_url_alias($sql, 'controller=category&path={0}', array('path'), array('name'));
with
//generate category
$sql = "select category_id, name from category_description";
$this->_generate_url_alias($sql, 'controller=category&path={0}', array('category_id'), array('name'));
//generate sub-category into category
$sql = "select category.parent_id, category.category_id, category_description.category_id, category_description.name FROM category, category_description WHERE category.category_id = category_description.category_id";
$this->_generate_url_alias($sql, 'controller=category&path={0}_{1}', array('parent_id', 'category_id'), array('name'));
I also had to add
$this->_insert_url_alias('controller=search&action=page', 'search.html');
$this->_insert_url_alias('controller=account_forgotten', 'forgotten-password.html');
I don't know if this is the correct way or the incorrect way but it works for me. Not being a programmer, I have to resort to desperate measures