Showing posts with label How to get current category id OpenCart. Show all posts
Showing posts with label How to get current category id OpenCart. Show all posts

Monday, 7 July 2014

Get Current Category in opencart


Get Current Category in opencart

if(isset($this->request->get['path'])) {
    $path = $this->request->get['path'];
    $cats = explode('_', $path);
    $cat_id = $cats[count($cats) - 1];
}
echo $cat_id;