Post by artcore » Mon Jun 22, 2015 2:55 pm

Hi, you're welcome :) You're right. I'm not using list view and just started the first project with oc2.
That said, there used to be a javascript on the bottom of the category.tpl that adds classes and rearranges parts to cater for list/grid.
Being on the train right now, I'm can't check if oc2 still has this at the bottom or moved it to the common.js but this is where you add(grid)/remove(list) the flex class.

Cheers

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by josuito » Tue Feb 02, 2016 1:38 am

It took me days to figurate it out but here you go guys:
Go to your: catalog/view/theme/yourtheme/js/common.js
find and change this:

Code: Select all

 if (cols1 == 2) {
		$('#content .product-layout:nth-child(2n+2)').after('<div class="clearfix visible-md visible-sm"></div>');
	} else if (cols1 == 1) {
		$('#content .product-layout:nth-child(3n+3)').after('<div class="clearfix hidden-xs"></div>');
	} else {
		$('#content .product-layout:nth-child(4n+5)').addClass('last');
	}


TO: I have 1 column so I changed only that statement: (I had 3 products before and I want 4 per row now):

Code: Select all

 else if (cols1 == 1) {
		$('#content .product-layout:nth-child(4n+4)').after('<div class="clearfix hidden-xs"></div>');



the go to your: catalog/view/theme/yourtheme/template/module/featured.tpl
find and change this:

Code: Select all

 <div class="product-layout col-lg-4 col-md-4 col-sm-6 col-xs-12">


TO:

Code: Select all

 <div class="product-layout col-lg-3 col-md-3 col-sm-6 col-xs-12">


Hopefully this helped!! 8) ohh BDW using OC V2.0 and don't forget to change the class layout to all the .tpl's that arrays any product list-grid.

Newbie

Posts

Joined
Tue Feb 02, 2016 1:23 am
Who is online

Users browsing this forum: No registered users and 4 guests