Post by pablormago » Wed Feb 21, 2018 10:34 pm

Hi to all!!
I am in the early stage on developing a Mod. Its easy and simple, but i cant find a way to resolve a problem.

I need to fill a dropdown with the full category tree, like this:

- Category 1
- Category 1 - SubCat 1
- Category 1 - SubCat 2 - SubCat 1
- Category 2
And so...
I couldnt find an OC function for this, i also tried to code some php script, but i only achieved to get the full list of categories, without order and without a tree looking.

Is there an OC function y forgot?? Is there any Sql statement that could help me? I know the category_path table is there, but im completely stucked!!

Thanks in advance!

Newbie

Posts

Joined
Wed Feb 21, 2018 9:50 pm

Post by straightlight » Thu Feb 22, 2018 7:07 am

No OC version posted. See this extension: https://www.opencart.com/index.php?rout ... n_id=27907

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by pablormago » Thu Feb 22, 2018 7:34 am

straightlight wrote:
Thu Feb 22, 2018 7:07 am
No OC version posted. See this extension: https://www.opencart.com/index.php?rout ... n_id=27907
Its 2.3.0.2. Thanks for your answer, but i need to do it myself, as part of the mod im working on...

My main need its to retrieve the full category tree from the database.

Newbie

Posts

Joined
Wed Feb 21, 2018 9:50 pm

Post by pablormago » Fri Feb 23, 2018 6:20 pm

Done!! Here is an example http://laclonadora.com/prueba11.php

The thing now is to translate it to opencart code.
Last edited by pablormago on Wed Feb 28, 2018 8:21 pm, edited 1 time in total.

Newbie

Posts

Joined
Wed Feb 21, 2018 9:50 pm

Post by straightlight » Fri Feb 23, 2018 8:05 pm

This dropdown only demonstrates a maximum of 1 sub-categories which Opencart can already demonstrate ...

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by pablormago » Wed Feb 28, 2018 8:21 pm

You can try now.

Newbie

Posts

Joined
Wed Feb 21, 2018 9:50 pm
Who is online

Users browsing this forum: No registered users and 2 guests