kos2 Posted August 31, 2010 Share Posted August 31, 2010 Hello friends,I would like to make a Mega Drop Down Menu (very fashionable) with categories and subcategories of my site.I have a basic level of php and smarty but something rather little.I managed to list the categories, with the following code:{foreach from=$categories item=category}getcategoryLink($category.id_category, $category.link_rewrite)}>{$category.name|escape:'htmlall':'UTF-8'}{/foreach}the problem is that this only shows me the parent category. No subcategories. I have tried with foreach from = $subcategories but returns an empty value. I have also gained access to the subcategories using $blockCategTree.children.0.children (1.children, 2.children ... ..), but no such list them all. Thus the questions are:1 - How I can do to list the categories and subcategories?2 - How I can list for example the latest products added? I tried to copy the code blocknewproducts.tpl module and does not work. As I can list the new products on any page or block the site?Finally, anyone know of a Spanish-language tutorial that explains these things well?Forgive me for my EnglishThank you very much,Marcos Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 31, 2010 Share Posted August 31, 2010 You need to see how the category tree is built in the categories block.See getTree() in blockcategories.php and how the tree is presented in blockcategories.tpl. Link to comment Share on other sites More sharing options...
htech Posted April 7, 2011 Share Posted April 7, 2011 hey guysplease can you help, im going crazy here!iv taken the following product slider code and need to change it into a category code so iv done the following : {counter start=0 assign=nbPrd} {foreach from=$bandmovingboxes_products item=bandmovingboxes_product name=bandmovingboxes} getImageLink($bandmovingboxes_product.link_rewrite, $bandmovingboxes_product.id_image, 'large')}" alt="{$bandmovingboxes_product.legend|escape:htmlall:'UTF-8'}" /> getImageLink($bandmovingboxes_product.link_rewrite, $bandmovingboxes_product.id_image, 'large')}" alt="{$bandmovingboxes_product.legend|escape:htmlall:'UTF-8'}" /> {$bandmovingboxes_offer_message} {convertPrice price=$bandmovingboxes_product.price} {$bandmovingboxes_product.name|truncate:27:'...'|escape:'htmlall':'UTF-8'} {/foreach} <!-- the scroller --> <!-- slider --> and i changed it to the following : {counter start=0 assign=nbPrd} {foreach from=$bandmovingboxes_category item=bandmovingboxes_category name=bandmovingboxes} getCatImageLink($bandmovingboxes_category.link_rewrite, $bandmovingboxes_category.id_image, 'large')}" alt="{$bandmovingboxes_category.legend|escape:htmlall:'UTF-8'}" /> getCatImageLink($bandmovingboxes_category.link_rewrite, $bandmovingboxes_category.id_image, 'large')}" alt="{$bandmovingboxes_category.legend|escape:htmlall:'UTF-8'}" /> {$bandmovingboxes_offer_message} {convertPrice price=$bandmovingboxes_category.} {$bandmovingboxes_category.name|truncate:27:'...'|escape:'htmlall':'UTF-8'} {/foreach} <!-- the scroller --> <!-- slider --> it just shows up blank and nothing shows on the frontpage at allPlease help guys what am i doing wrong???? Link to comment Share on other sites More sharing options...
andiH. Posted October 29, 2011 Share Posted October 29, 2011 so there is no "easy" way to simply fetch category images and links? i want to establish something similar. help would be very much appreciated. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now