Jump to content

Top menu categories arrange newest model first automatically


mdusamaansari

Recommended Posts

Hi divyeshp,

 

I need the top menu categories to be arranged the categories automatically by choosing the newest model first.

 

Today we manually add the top menu categories, but we need the menu to arrange the categories by itself and choose the newest model first, and afterwards the most popular models in the given model or type category.

 

 

Thanks in advance.

 

mdusamaansari

Link to comment
Share on other sites

in this case it's necessary to modify the module .php file

 

you can find there queries similar to:

'SELECT bcp.`id_cms_category`, bcp.`id_parent`, bcp.`level_depth`, bcp.`active`, bcp.`position`, cl.`name`, cl.`link_rewrite`
				FROM `'._DB_PREFIX_.'cms_category` bcp
				INNER JOIN `'._DB_PREFIX_.'cms_category_lang` cl
				ON (bcp.`id_cms_category` = cl.`id_cms_category`)
				WHERE cl.`id_lang` = '.(int)$id_lang.'
				AND bcp.`id_parent` = '.(int)$parent;

it's necessary to add there "order by" clause:

ORDER BY bcp.id_parent ASC
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...