You get a bonus - 1 coin for daily activity. Now you have 1 coin

OpenCart: correct links for child categories when the SEO URL doesn't exist

Practice




opencart correct links for child categories when the seo url doesn't exist





need to add
} elseif ($key == 'path')
{
$categories = explode('_', $value);

foreach ($categories as $category)
{
$query = $this->db->query("SELECT * FROM " . DB_PREFIX .
"url_alias WHERE `query` = 'category_id=" . (int)$category . "'");



if ($query->num_rows)
{
$url .= '/' . $query->row['keyword'];
}
else $url='/category&path='.$value;
}



in l/catalog/controller/common/seo_url.php

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)