Jump to content

Afficher par défaut mes produits en liste plutôt qu'en grille


Gavimse

Recommended Posts

Bonjour,

Je cherche à afficher par défaut mes pages product list en liste plutôt qu'en grille.

J'ai regardé sur les forums et les solutions trouvées ne fonctionnent pas, pas même le module configurateur de thème (j'utilise presta 1.6.1.24)

Voici donc mon code global.js de mon thème (désolé ça fait un gros pavé), que faut-il modifier?

jQuery(function ($) {
    "use strict";
    var pageBody = $("body");

    function isTouchDevice() {
        return typeof window.ontouchstart != "undefined" ? true : false
    }
    if (isTouchDevice()) pageBody.addClass("touch");
    else pageBody.addClass("notouch")
});

jQuery(function ($) {
    "use strict";
    var productCarousel = $(".product-carousel"),
    container = $(".container");    
    if (productCarousel.length > 0) productCarousel.each(function () {
    var items = 3,
        itemsDesktop = 3,
        itemsDesktopSmall = 2,
        itemsTablet = 2,
        itemsMobile = 1;
    if ($("body").hasClass("noresponsive")) var items = 3,
    itemsDesktop = 3, itemsDesktopSmall = 3, itemsTablet = 3, itemsMobile = 3;
    else if ($(this).closest("section.col-md-8.col-lg-9").length > 0) var items = 3,
    itemsDesktop = 3, itemsDesktopSmall = 2, itemsTablet = 2, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-9").length > 0) var items = 3,
    itemsDesktop = 3, itemsDesktopSmall = 2, itemsTablet = 2, itemsMobile = 1;
    else if ($(this).closest("section.col-sm-12.col-lg-6").length > 0) var items = 2,
    itemsDesktop = 2, itemsDesktopSmall = 3, itemsTablet = 2, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-6").length > 0) var items = 2,
    itemsDesktop = 2, itemsDesktopSmall = 2, itemsTablet = 2, itemsMobile = 1;
    else if ($(this).closest("section.col-sm-12.col-lg-3").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 3, itemsTablet = 2, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-3").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 2, itemsTablet = 2, itemsMobile = 1;
    $(this).owlCarousel({
        items: items,
        itemsDesktop: [1199, itemsDesktop],
        itemsDesktopSmall: [991, itemsDesktopSmall],
        itemsTablet: [768, itemsTablet],
        itemsTabletSmall: false,
        itemsMobile: [480, itemsMobile],
        navigation: true,
        pagination: false,
        rewindNav: true,
        navigationText: ["", ""],
        scrollPerPage: true,
        slideSpeed: 500,
        beforeInit: function rtlSwapItems(el) {
            if ($("body").hasClass("rtl")) el.children().each(function (i, e) {
                $(e).parent().prepend($(e))
            })
        },
        afterInit: function afterInit(el) {
            if ($("body").hasClass("rtl")) this.jumpTo(1000)
        }
    })
    });
});
jQuery(function ($) {
    "use strict";
    var brandCarousel = $(".botcontent-carousel"),
    container = $(".container");    
    if (brandCarousel.length > 0) brandCarousel.each(function () {
    var items = 1,
        itemsDesktop = 1,
        itemsDesktopSmall = 1,
        itemsTablet = 1,
        itemsMobile = 1;
    if ($("body").hasClass("noresponsive")) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 1, itemsTablet = 1, itemsMobile = 1;
    else if ($(this).closest("section.col-md-8.col-lg-9").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 1, itemsTablet = 1, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-9").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 1, itemsTablet = 1, itemsMobile = 1;
    else if ($(this).closest("section.col-sm-12.col-lg-6").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 1, itemsTablet = 1, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-6").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 1, itemsTablet = 1, itemsMobile = 1;
    else if ($(this).closest("section.col-sm-12.col-lg-3").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 1, itemsTablet = 1, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-3").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 1, itemsTablet = 1, itemsMobile = 1;
    $(this).owlCarousel({
        items: items,
        itemsDesktop: [1199, itemsDesktop],
        itemsDesktopSmall: [991, itemsDesktopSmall],
        itemsTablet: [768, itemsTablet],
        itemsTabletSmall: [618, 1],
        itemsMobile: [480, itemsMobile],
        navigation: true,
        pagination: true,
        rewindNav: true,
        navigationText: ["", ""],
        scrollPerPage: true,
        slideSpeed: 500,
        beforeInit: function rtlSwapItems(el) {
            if ($("body").hasClass("rtl")) el.children().each(function (i, e) {
                $(e).parent().prepend($(e))
            })
        },
        afterInit: function afterInit(el) {
            if ($("body").hasClass("rtl")) this.jumpTo(1000)
        }
    })
    });
});    
jQuery(function ($) {
    "use strict";
    var productCarousel = $(".product-carousel2"),
    container = $(".container");    
    if (productCarousel.length > 0) productCarousel.each(function () {
    var items = 4,
        itemsDesktop = 4,
        itemsDesktopSmall = 3,
        itemsTablet = 2,
        itemsMobile = 1;
    if ($("body").hasClass("noresponsive")) var items = 4,
    itemsDesktop = 4, itemsDesktopSmall = 4, itemsTablet = 4, itemsMobile = 4;
    else if ($(this).closest("section.col-md-8.col-lg-9").length > 0) var items = 2,
    itemsDesktop = 2, itemsDesktopSmall = 1, itemsTablet = 1, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-9").length > 0) var items = 2,
    itemsDesktop = 2, itemsDesktopSmall = 1, itemsTablet = 1, itemsMobile = 1;
    else if ($(this).closest("section.col-sm-12.col-lg-6").length > 0) var items = 2,
    itemsDesktop = 2, itemsDesktopSmall = 1, itemsTablet = 1, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-6").length > 0) var items = 2,
    itemsDesktop = 2, itemsDesktopSmall = 1, itemsTablet = 1, itemsMobile = 1;
    else if ($(this).closest("section.col-sm-12.col-lg-3").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 1, itemsTablet = 1, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-3").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 1, itemsTablet = 1, itemsMobile = 1;
    $(this).owlCarousel({
        items: items,
        itemsDesktop: [1199, itemsDesktop],
        itemsDesktopSmall: [991, itemsDesktopSmall],
        itemsTablet: [768, itemsTablet],
        itemsTabletSmall: false,
        itemsMobile: [480, itemsMobile],
        navigation: true,
        pagination: false,
        rewindNav: true,
        navigationText: ["", ""],
        scrollPerPage: true,
        slideSpeed: 500,
        beforeInit: function rtlSwapItems(el) {
            if ($("body").hasClass("rtl")) el.children().each(function (i, e) {
                $(e).parent().prepend($(e))
            })
        },
        afterInit: function afterInit(el) {
            if ($("body").hasClass("rtl")) this.jumpTo(1000)
        }
    })
    });
});
jQuery(function ($) {
    "use strict";
    var brandCarousel = $(".brand-carousel"),
    container = $(".container");    
    if (brandCarousel.length > 0) brandCarousel.each(function () {
    var items = 6,
        itemsDesktop = 5,
        itemsDesktopSmall = 3,
        itemsTablet = 3,
        itemsMobile = 1;
    if ($("body").hasClass("noresponsive")) var items = 6,
    itemsDesktop = 6, itemsDesktopSmall = 6, itemsTablet = 6, itemsMobile = 6;
    else if ($(this).closest("section.col-md-8.col-lg-9").length > 0) var items = 3,
    itemsDesktop = 3, itemsDesktopSmall = 3, itemsTablet = 3, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-9").length > 0) var items = 3,
    itemsDesktop = 3, itemsDesktopSmall = 3, itemsTablet = 3, itemsMobile = 1;
    else if ($(this).closest("section.col-sm-12.col-lg-6").length > 0) var items = 2,
    itemsDesktop = 2, itemsDesktopSmall = 4, itemsTablet = 3, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-6").length > 0) var items = 2,
    itemsDesktop = 2, itemsDesktopSmall = 3, itemsTablet = 3, itemsMobile = 1;
    else if ($(this).closest("section.col-sm-12.col-lg-3").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 4, itemsTablet = 3, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-3").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 3, itemsTablet = 3, itemsMobile = 1;
    $(this).owlCarousel({
        items: items,
        itemsDesktop: [1199, itemsDesktop],
        itemsDesktopSmall: [991, itemsDesktopSmall],
        itemsTablet: [768, itemsTablet],
        itemsTabletSmall: [618, 2],
        itemsMobile: [480, itemsMobile],
        navigation: true,
        pagination: false,
        rewindNav: true,
        navigationText: ["", ""],
        scrollPerPage: true,
        slideSpeed: 500,
        beforeInit: function rtlSwapItems(el) {
            if ($("body").hasClass("rtl")) el.children().each(function (i, e) {
                $(e).parent().prepend($(e))
            })
        },
        afterInit: function afterInit(el) {
            if ($("body").hasClass("rtl")) this.jumpTo(1000)
        }
    })
    });
});    
jQuery(function ($) {
    "use strict";
    var productCarousel = $(".thumb-carousel"),
    container = $(".container");    
    if (productCarousel.length > 0) productCarousel.each(function () {
    var items = 3,
        itemsDesktop = 3,
        itemsDesktopSmall = 2,
        itemsTablet = 2,
        itemsMobile = 1;
    if ($("body").hasClass("noresponsive")) var items = 3,
    itemsDesktop = 3, itemsDesktopSmall = 3, itemsTablet = 3, itemsMobile = 3;
    else if ($(this).closest("section.col-md-8.col-lg-9").length > 0) var items = 3,
    itemsDesktop = 3, itemsDesktopSmall = 2, itemsTablet = 2, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-9").length > 0) var items = 3,
    itemsDesktop = 3, itemsDesktopSmall = 2, itemsTablet = 2, itemsMobile = 1;
    else if ($(this).closest("section.col-sm-12.col-lg-6").length > 0) var items = 2,
    itemsDesktop = 2, itemsDesktopSmall = 3, itemsTablet = 2, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-6").length > 0) var items = 2,
    itemsDesktop = 2, itemsDesktopSmall = 2, itemsTablet = 2, itemsMobile = 1;
    else if ($(this).closest("section.col-sm-12.col-lg-3").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 3, itemsTablet = 2, itemsMobile = 1;
    else if ($(this).closest("section.col-lg-3").length > 0) var items = 1,
    itemsDesktop = 1, itemsDesktopSmall = 2, itemsTablet = 2, itemsMobile = 1;
    $(this).owlCarousel({
        items: items,
        itemsDesktop: [1199, itemsDesktop],
        itemsDesktopSmall: [980, itemsDesktopSmall],
        itemsTablet: [768, itemsTablet],
        itemsTabletSmall: false,
        itemsMobile: [480, itemsMobile],
        navigation: true,
        pagination: false,
        rewindNav: true,
        navigationText: ["", ""],
        scrollPerPage: true,
        slideSpeed: 500,
        beforeInit: function rtlSwapItems(el) {
            if ($("body").hasClass("rtl")) el.children().each(function (i, e) {
                $(e).parent().prepend($(e))
            })
        },
        afterInit: function afterInit(el) {
            if ($("body").hasClass("rtl")) this.jumpTo(1000)
        }
    })
    });
});

jQuery(function ($) {
    "use strict";
    $(window).resize(function () {
                
    });
});        
jQuery(function ($) {
    "use strict";
    $("#off-canvas-menu .haschild .mega-child-icon").click(function (e) {
        e.preventDefault();
        var _parent = $(this).parent();
        var _dropdown = _parent.next('.dropdown-menu');
        var _grandparent = _parent.parent();
        _grandparent.removeClass('open');
        if(_grandparent.hasClass('ov-open')) {
            _grandparent.removeClass('ov-open');
            _dropdown.slideUp("normal");
        } else {
            _grandparent.addClass('ov-open');            
            _dropdown.slideDown("normal");            
        }    
        
        
    })
    $("#off-canvas-menu .haschild .mega-child-icon").mouseover(function (e) {       
        e.preventDefault();
        return false;        
    })
    $("#off-canvas-menu li a").mouseover(function (e) {       
        e.preventDefault();
        return false;
        
    })
});
function view_as() {
    var viewGrid = $(".view-grid"),
        viewList = $(".view-list"),
        productList = $(".products-list");
    viewGrid.click(function (e) {        
        productList.removeClass("products-list-in-row");
        productList.addClass("products-list-in-column");
        $(this).addClass('active');
        viewList.removeClass("active");
        e.preventDefault()
    });
    viewList.click(function (e) {        
        productList.removeClass("products-list-in-column");
        productList.addClass("products-list-in-row");
        viewGrid.removeClass("active");
        $(this).addClass('active');        
        e.preventDefault()
    })
}
jQuery(function ($) {
    "use strict";
    view_as();
});
jQuery(function ($) {
    "use strict";
    $.initQuantity = function ($control) {
        $control.each(function () {
            var $this = $(this),
                data = $this.data("inited-control"),
                $plus = $(".input-group-addon:last", $this),
                $minus = $(".input-group-addon:first", $this),
                $value = $(".form-control", $this);
            if (!data) {
                $control.attr("unselectable", "on").css({
                    "-moz-user-select": "none",
                    "-o-user-select": "none",
                    "-khtml-user-select": "none",
                    "-webkit-user-select": "none",
                    "-ms-user-select": "none",
                    "user-select": "none"
                }).bind("selectstart", function () {
                    return false
                });
                $plus.click(function () {
                    var val =
                        parseInt($value.val()) + 1;
                    $value.val(val);
                    return false
                });
                $minus.click(function () {
                    var val = parseInt($value.val()) - 1;
                    $value.val(val > 0 ? val : 1);
                    return false
                });
                $value.blur(function () {
                    var val = parseInt($value.val());
                    $value.val(val > 0 ? val : 1)
                })
            }
        })
    };
    $.initQuantity($(".quantity-control"));
    $.initSelect = function ($select) {
        $select.each(function () {
            var $this = $(this),
                data = $this.data("inited-select"),
                $value = $(".value", $this),
                $hidden = $(".input-hidden", $this),
                $items = $(".dropdown-menu li > a", $this);
            if (!data) {
                $items.click(function (e) {
                    if ($(this).closest(".sort-isotope").length >
                        0) e.preventDefault();
                    var data = $(this).attr("data-value"),
                        dataHTML = $(this).html();
                    $this.trigger("change", {
                        value: data,
                        html: dataHTML
                    });
                    $value.html(dataHTML);
                    if ($hidden.length) $hidden.val(data)
                });
                $this.data("inited-select", true)
            }
        })
    };
    $.initSelect($(".btn-select"))
});
jQuery(function ($) {
    "use strict";
    $("#off-canvas-menu-toggle").bind("click", function (e) {
        $("body").toggleClass("off-canvas-menu-open");        
        $("html, body").animate({
            scrollTop: 0
        }, "300");
        e.preventDefault()
    });
    $("#off-canvas-menu-close").bind("click", function (e) {
        $("body").removeClass("off-canvas-menu-open");        
    });    
});

jQuery(document).ready(function() {
    jQuery('.owl-item').addClass("a-hidden").viewportChecker({
        classToAdd: 'a-visible animated fadeInUp', // Class to add to the elements when they are visible
        offset: 30    
    });   
    jQuery('.service-box').addClass("a-hidden").viewportChecker({
        classToAdd: 'a-visible animated fadeInUp', // Class to add to the elements when they are visible
        offset: 30    
    });
    jQuery('.jms-blog').addClass("a-hidden").viewportChecker({
        classToAdd: 'a-visible animated fadeInUp', // Class to add to the elements when they are visible
        offset: 30    
    });
    jQuery('.jms_testimonials').addClass("a-hidden").viewportChecker({
        classToAdd: 'a-visible animated fadeInUp', // Class to add to the elements when they are visible
        offset: 30    
    });
    jQuery('.intro_special_product').addClass("a-hidden").viewportChecker({
        classToAdd: 'a-visible animated fadeInLeft', // Class to add to the elements when they are visible
        offset: 30    
    });
    jQuery('.deal_home').addClass("a-hidden").viewportChecker({
        classToAdd: 'a-visible animated fadeInRight', // Class to add to the elements when they are visible
        offset: 30    
    });
    
    
});  

jQuery(function ($) {
    "use strict";
    $(window).scroll(function () {
        if ($(window).scrollTop() >= 50) {    
            $(".header-bar").addClass("navbar-fixed-top");
            $("#back-to-top").stop().fadeIn(300);
        } else if ($(window).scrollTop() < 200) {
            $("#back-to-top").stop().fadeOut(300);
            $(".header-bar").removeClass("navbar-fixed-top");
        }
    });
});
jQuery(function ($) {
    "use strict";
    $(".search-box > a").click(function (e) {
        $('#jms_ajax_search').toggleClass('jms_search');
        e.stopPropagation();
        return false;
    })
});

function quick_view() {
    $(document).on('click', '.quick-view:visible', function(e)
    {
        e.preventDefault();        
        var url = this.rel;        
        if (url.indexOf('?') != -1)
            url += '&';
        else
            url += '?';

        if (!!$.prototype.fancybox)
            $.fancybox({
                'padding':  0,
                'width':    900,
                'height':   450,
                'type':     'iframe',
                'href':     url + 'content_only=1'
            });
    });
}
function back_to_top() {      
    $('.back-to-top').click(function(event) {
        event.preventDefault();
        $('html, body').animate({scrollTop: 0}, 500);
        return false;
    })
}

var initialLoad = true;
$(document).ready(function() {
    if(initialLoad){
        $(".loader").fadeOut("slow");
        initialLoad = false;
    }
});
$(window).load(function () {          
    $('.dropdown-menu input, .dropdown-menu label').click(function(e) {
        e.stopPropagation();
    });     
    quick_view();
    back_to_top();
    $(".view-grid").addClass('active');
    
});

 

Link to comment
Share on other sites

Mon product-list :

{if isset($products)}
<!-- Products list -->
    <div id="product_list" class="products-list products-list-in-column row">
    {$i=0}
    {foreach from=$products item=product name=products}
        <div class="item ajax_block_product">
            <div class="product-preview">
                <div class="preview">
                    <a href="{$product.link|escape:'html'}" class="preview-image product_img_link">
                    <img class="img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html'}" alt="" />
                    {if $productlist_op.hoverimage}
                    <div class="product-img2" data-id-product="{$product.id_product}"></div>
                    {/if}
                    </a>
                    {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
                         <span class="label label-sale">{l s='Sale'}</span>
                    {elseif isset($product.new) && $product.new == 1}
                         <span class="label label-new">{l s='New'}</span>
                    {/if}
                </div>
                <div class="product-info">
                    <div class="info_top">
                        {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
                            {if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
                                <span class="old price">
                                    {displayWtPrice p=$product.price_without_reduction}
                                </span>
                            {/if}
                            <span class="price new">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>
                        {/if}
                    </div>
                    <div class="info_center">
                        <h3 class="title"><a href="{$product.link|escape:'html'}">{$product.name|truncate:45:'...'|escape:'html':'UTF-8'}</a></h3>
                        {if $product.description_short}
                            <div id="short_description_content" class="rte align_justify" itemprop="description">
                                {$product.description_short|strip_tags:'UTF-8'|truncate:100:'...'}
                            </div>
                        {/if}

                    </div>
                    <div class="list_info">
                        <h3 class="title"><a href="{$product.link|escape:'html'}">{$product.name|truncate:35:'...'|escape:'html':'UTF-8'}</a></h3>
                        <!--description-->
                        <div class="list_description">{$product.description_short|strip_tags:'UTF-8'|truncate:260:'...'}</div>
                        <div class="list-price">
                        {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
                            {if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
                                <span class="old price">
                                    {displayWtPrice p=$product.price_without_reduction}
                                </span>
                            {/if}
                            <span class="price new">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>
                        {/if}
                        </div>

                    </div>

                  </div>                                            
            </div>
        </div>
        {$i=$i+1}
    {/foreach}
    </div>
    <!-- /Products list -->
{/if}

Link to comment
Share on other sites

Mon product-sort :

{if isset($orderby) AND isset($orderway)}

{* On 1.5 the var request is setted on the front controller. The next lines assure the retrocompatibility with some modules *}
{if !isset($request)}
    <!-- Sort products -->
    {if isset($smarty.get.id_category) && $smarty.get.id_category}
        {assign var='request' value=$link->getPaginationLink('category', $category, false, true)}
    {elseif isset($smarty.get.id_manufacturer) && $smarty.get.id_manufacturer}
        {assign var='request' value=$link->getPaginationLink('manufacturer', $manufacturer, false, true)}
    {elseif isset($smarty.get.id_supplier) && $smarty.get.id_supplier}
        {assign var='request' value=$link->getPaginationLink('supplier', $supplier, false, true)}
    {else}
        {assign var='request' value=$link->getPaginationLink(false, false, false, true)}
    {/if}
{/if}

<script type="text/javascript">
//<![CDATA[
$(document).ready(function()
{
    $('.dropdown-menu li > a').click(function(e){
        var requestSortProducts = '{$request}';        
        var splitData = $(this).data('value').split(':');
        document.location.href = requestSortProducts + ((requestSortProducts.indexOf('?') < 0) ? '?' : '&') + 'orderby=' + splitData[0] + '&orderway=' + splitData[1];
    });
    /*$('.selectProductSort').change(function()
    {
        var requestSortProducts = '{$request}';
        var splitData = $(this).val().split(':');
        document.location.href = requestSortProducts + ((requestSortProducts.indexOf('?') < 0) ? '?' : '&') + 'orderby=' + splitData[0] + '&orderway=' + splitData[1];
    });*/
});
//]]>
</script>

<form id="productsSortForm" action="{$request|escape:'htmlall':'UTF-8'}">
        <label>{l s='Sort by'}</label>&nbsp;    
        <div class="btn-group btn-select sort-select sort-isotope">
            <a href="#" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
                <span class="value">
                {if $orderby eq $orderbydefault}{l s='Sort by'}{/if}
                {if $orderby eq 'price' AND $orderway eq 'asc'}{l s='Price: Lowest first'}{/if}
                {if $orderby eq 'price' AND $orderway eq 'desc'}{l s='Price: Highest first'}{/if}
                {if $orderby eq 'name' AND $orderway eq 'asc'}{l s='Product Name: A to Z'}{/if}
                {if $orderby eq 'name' AND $orderway eq 'desc'}{l s='Product Name: Z to A'}{/if}
                {if $orderby eq 'quantity' AND $orderway eq 'desc'}{l s='In stock'}{/if}
                {if $orderby eq 'reference' AND $orderway eq 'asc'}{l s='Reference: Lowest first'}{/if}
                {if $orderby eq 'reference' AND $orderway eq 'desc'}{l s='Reference: Highest first'}{/if}                
                </span>
                <span class="caret min"></span>
            </a>
            <ul class="dropdown-menu">
            
                <li><a href="#" data-value="{$orderbydefault|escape:'html':'UTF-8'}:{$orderwaydefault|escape:'html':'UTF-8'}">{l s='Sort by'}</a></li>
                <li><a href="#" data-value="price:asc">{l s='Price: Lowest first'}</a></li>
                <li><a href="#" data-value="price:desc">{l s='Price: Highest first'}</a></li>
                <li><a href="#" data-value="name:asc">{l s='Product Name: A to Z'}</a></li>
                <li><a href="#" data-value="name:desc">{l s='Product Name: Z to A'}</a></li>
                {if !$PS_CATALOG_MODE}
                <li><a href="#" data-value="quantity:desc">{l s='In stock'}</a></li>
                {/if}
                <li><a href="#" data-value="reference:asc">{l s='Reference: Lowest first'}</a></li>
                <li><a href="#" data-value="reference:desc">{l s='Reference: Highest first'}</a></li>
            </ul>    
        </div>
</form>
<!-- /Sort products -->
{/if}

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