Post by girock » Mon Apr 12, 2010 9:24 pm

I need code for a category menu dropdown like this http://www.alreadymade.com/shop/index.p ... duct_id=42
I'm trying to modify this but I'm not understand this code.
Help please, how do a simple dropdown menu for three subcategory? ??? ??? ???

Newbie

Posts

Joined
Wed Apr 07, 2010 4:12 pm

Post by grantdp » Tue Apr 13, 2010 1:20 am

Have a look here there a plenty of drop down menu:

http://www.cssplay.co.uk/menus/

New member

Posts

Joined
Fri Apr 03, 2009 7:44 am

Post by girock » Tue Apr 13, 2010 2:41 am

My problem is not with css code but with opencart database query.
I don't know where is the query for third level here:
public function fetchCategories(){

$query = $this->db->query("SELECT * FROM category c LEFT JOIN category_description cd ON (c.category_id = cd.category_id) WHERE cd.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY c.sort_order");

return $query->rows;
}

public function fetchCategory($category_id = 0){
$query = $this->db->query("SELECT * FROM category c LEFT JOIN category_description cd ON (c.category_id = cd.category_id) WHERE c.parent_id = '" . (int)$category_id . "' AND cd.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY c.sort_order");

return $query->rows;



This is the code in the catalog/model/catalog/category.

If I use only css for create my menu the third category is visible but I must to click for view subcategory

Newbie

Posts

Joined
Wed Apr 07, 2010 4:12 pm
Who is online

Users browsing this forum: No registered users and 10 guests