Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • visability Friend
    #208586

    Thanks for a great template!

    Is it possible to change the default view when viewing a list of virtuemart products in the category view? The default view is in a grid format but I would really like it to default to list view.

    pavit Moderator
    #577064

    Hi

    Try in this way

    Open this file templatesja_techzonehtmlcom_virtuemartcategorydefault.php at the bottom of the file there is a portion of javascript code

    edit it in this way

    FROM:

    // check cookie
    if ($.cookie('gridlist') && $.cookie('gridlist') == 'list') {
    $('#list').addClass('active');
    $('#grid').removeClass('active');
    $('#list span').addClass('icon-white');
    $('.product').addClass('list-group-item');
    }

    TO :

    // check cookie
    if ($.cookie('gridlist') && $.cookie('gridlist') == 'grid') {
    $('#list').addClass('active');
    $('#grid').removeClass('active');
    $('#list span').addClass('icon-white');
    $('.product').addClass('list-group-item');
    }

    Now on the same file go to line 93 and find

    <div class="floatright gridlist">
    <span>View</span>
    <div class="view">
    <a href="#" id="list" class=""><i class="fa fa-th-list"></i></a>
    <a href="#" id="grid" class="active"><i class="fa fa-th icon-white"></i></a>
    </div>
    </div>

    change it to

    <div class="floatright gridlist">
    <span>View</span>
    <div class="view">
    <a href="#" id="list" class="active"><i class="fa fa-th-list"></i></a>
    <a href="#" id="grid" class=""><i class="fa fa-th icon-white"></i></a>
    </div>
    </div>

    Save it and refresh your VM Page .

    visability Friend
    #577065

    Thank you for replying to my post over the weekend Pavit.

    I tried your solution but it did not work for me. I cleared my browser cache and cookies to make sure but it did not work. Your solution has shown me where to start looking though so it has been a great help. Thank you.

    pavit Moderator
    #577066

    Hi

    I tested it on my localhost on the quickstart version of the template before to post here, and it worked so i suppose you are missing some step.

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 2 voices, and was last updated by  pavit 8 years, 9 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum