I would like to make url structure for products with their categories tree structure like below.
www.site.com/main-category/sub-category/sub-category/.../product-name
Already I have defined in route.php for pages like
$route['(:any)'] = function ($slug) {
return 'Page/show/'.$slug; };
Now what i should do for products ?