Jump to content

Brands in order of quantity of products they contain


Marcso

Recommended Posts

Good morning,
I hope you can help me.
I would like to insert a code that would allow me to show the logos of the brands in order of quantity of products that these brands contain. Currently the list of brands is shown in alphabetical order. I would like to insert this code inside a widget that I would put inside the main menu.
I am attaching the code I have at the moment. This code adjusts the display of the widget. Thank you very much.

Marco

 

<div class="leo-widget" data-id_widget="{$id_widget}">
    <div class="widget-manufacture">
    {if isset($widget_heading)&&!empty($widget_heading)}
    <div class="menu-title">
        {$widget_heading}
    </div>
    {/if}
    <div class="widget-inner">
        {if manufacturers}
            <div class="manu-logo">
                {foreach from=$manufacturers item=manufacturer name=manufacturers}
                <a  href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{l s='view products' mod='leobootstrapmenu'}">
                <img {if isset($aplazyload) && $aplazyload}class="lazy" data-src{else}src{/if}="{$manufacturer.image|escape:'htmlall':'UTF-8'}" alt=""> </a>
                {/foreach}
            </div>
            {else}
               <p class="alert alert-info">{l s='No image logo at this time.' mod='leobootstrapmenu'}</p>
        {/if}
    </div>
    </div>
    {if $show_widget_bo == 'admin'}
        <div class="w-name">
            <select name="inject_widget" class="inject_widget_name">
                {foreach from=$widgets item=w}
                    <option value="{$w['key_widget']}">
                        {$w['name']}
                    </option>
                {/foreach}
            </select>
        </div>
    {/if}
</div>

 

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...