3 products per row - what needs changing

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
I've copied a question posted on your forum a year ago which is applicable to my needs today, but the resolutions looks to be for the mcv 1 or 2 version of nopcomm as it refers to aspx pages etc.

I'm using 2.6. thanks

The question is:

how to change the product layout so I can get 3 products  per row, smaller image maybe? and smaller space taken up by the product. What do I change please to achieve that.

Is is a layout change or something that can be changed through the admin panel.

Thank you in anticipation.
11 years ago
In CategoryTemplate.ProductsInGridOrLines.cshtml (line 189 or so) there is a line:

@(Html.DataList<ProductOverviewModel>(Model.Products, 2,
@<div class="item-box">
@Html.Partial("_ProductBox", @item)
</div>

Change the 2 into 3 like this:

@(Html.DataList<ProductOverviewModel>(Model.Products, 3,
@<div class="item-box">
@Html.Partial("_ProductBox", @item)
</div>

You probably have to make some changes to _ProductBox also

As always do not change the nop files directly but copy them to your theme folder

Themes/YourTheme/Views/Catalog/CategoryTemplate.ProductsInGridOrLines.cshtml

Nop will pick them up.
11 years ago
@keesjan

Hi.

Thanks again for your help. That got it, wonderful - would like the products on the homepage in the feature section to only display 2 images because I had increased their size and this adjustment squeezed those images into a smaller table cell and so a smaller width - but I will fiddle around - at least at last I am heading in the right direction. Thanks again and the warning regarding placement of the 'adjusted cshtml' into the themes/ views / catagory/ etc was well met hahahahaha.

Cheers
11 years ago
it would be great having these settings configurable from categorie management page
5 years ago
can you please help i count not find this information in
CategoryTemplate.ProductsInGridOrLines.cshtml (line 189 or so) there is a line:

@(Html.DataList<ProductOverviewModel>(Model.Products, 2,
@<div class="item-box">
@Html.Partial("_ProductBox", @item)
</div>
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.