E-Luminate Posted June 12, 2017 Share Posted June 12, 2017 Hi, I'm using the Galaxy X skin with Cubecart 6.18. Can anyone help me in changing the default product display within categories from grid to list? Thanks in advance. Neil. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 12, 2017 Share Posted June 12, 2017 Are you not getting any help from the developer? I hate to say it, but if not - you might do well to consider a better supported skin. Quote Link to comment Share on other sites More sharing options...
E-Luminate Posted June 12, 2017 Author Share Posted June 12, 2017 Nope, not a whisper. I've done too much to the skin so far to change. Plus I'm got a strict timescale to get everything done. I actually thought this request would be an easy one. Quote Link to comment Share on other sites More sharing options...
ayz1 Posted June 12, 2017 Share Posted June 12, 2017 Mine does seem to default to list view. If you do a file compare on your skins/skinname/content.category.php file with the one in the foundation skin then you might get an idea of what you need to edit. Alternatively you could back up your original file and copy the one from foundation to see if that works. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 12, 2017 Share Posted June 12, 2017 Show us what that section of your content.category.php looks like. Maybe we'll be able to help.. It's a shame when a developer abandons their customer base, but it happens to all of us if we stick around long enough. Quote Link to comment Share on other sites More sharing options...
E-Luminate Posted June 13, 2017 Author Share Posted June 13, 2017 Hi, I've changed the content.category.php to what I thought would swap the default to what I want, I deleted all cookies afterward too (as there is a product cookie). I still get Grid view as standard here is the code before: <div class="medium-4 columns show-for-medium-up"> <dl class="sub-nav right" id="layout_toggle"> <dd class="active"><a href="#" class="grid_view"><i class="fa fa-th-large"></i></a></dd> <dd><a href="#" class="list_view"><i class="fa fa-th-list"></i></a></dd> </dl> </div> And this is what I changed it to: <div class="medium-4 columns show-for-medium-up"> <dl class="sub-nav right" id="layout_toggle"> <dd><a href="#" class="grid_view"><i class="fa fa-th-large"></i></a></dd> <dd class="active"><a href="#" class="list_view"><i class="fa fa-th-list"></i></a></dd> </dl> </div> There doesn't seem to be any further mention of "list_view" anywhere else in the document. Quote Link to comment Share on other sites More sharing options...
ayz1 Posted June 13, 2017 Share Posted June 13, 2017 Try backing up the content.category file and copy in the file from the foundation skin. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 13, 2017 Share Posted June 13, 2017 I took out the line of code, just as you did @E-Luminate. It worked for me on a Foundation skin: <div class="medium-4 columns show-for-medium-up"> <dl class="sub-nav right" id="layout_toggle"> <!-- <dd><a href="#" class="grid_view"><svg class="icon"><use xlink:href="#icon-th-large"></use></svg></a></dd> --> <dd class="active"><a href="#" class="list_view"><svg class="icon"><use xlink:href="#icon-th-list"></use></svg></a></dd> </dl> </div> Of course Foundation has svg icons, and you have the FontAwesome icons in the list view. Quote Link to comment Share on other sites More sharing options...
ayz1 Posted June 13, 2017 Share Posted June 13, 2017 I think that code just sets the button to active, dont think it makes the layout change. I tried changing that last night myself and it didn't change the layout at all. Below that there appears to be two blocks of code one for the list view and one for the grid view. I think these might be the other way around in the Galaxy skin (hard to tell not having a copy). Maybe using the code from an appropriate foundation skin might be worth trying. The foundation skin on the cubecart demo defaults to list view whereas the Galaxy demo defaults to grid view. Quote Link to comment Share on other sites More sharing options...
E-Luminate Posted June 13, 2017 Author Share Posted June 13, 2017 Thanks for the suggestions guys. Have been looking at the code for a while and don't see how it outputs the grid format as standard, maybe something I'll look at later down the line maybe. Unless of course somebody else comes along with the same request! Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 14, 2017 Share Posted June 14, 2017 If the skin is Foundation, then the javascript code controls the initial (default) view. Other skins may or may not use the same approach. https://forums.cubecart.com/topic/51108-resolved-grid-view-only-disable-list-view-on-categories/ https://forums.cubecart.com/topic/49704-how-to-make-category-grid-view-as-default/ See the above conversations for ideas. (Even if I have a copy of Galaxy X, I can't access it right now.) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.