-
AuthorPosts
-
July 11, 2015 at 9:12 pm #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 Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
July 12, 2015 at 6:41 am #577064Hi
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 .
1 user says Thank You to pavit for this useful post
July 12, 2015 at 7:24 am #577065Thank 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 Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
July 12, 2015 at 7:32 am #577066Hi
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.
-
AuthorPosts
This topic contains 4 replies, has 2 voices, and was last updated by pavit 9 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum