Posted on 30/09/2015 09:26:32
Hi Hans
As of now the productlist only support up to 4 products. To implement it, requires a little work. In the productlist, start by doing what you did:
@GetProductList(GetLoop("Products"), 6)
Open the file "_wrap/Wrapmethods.cshtml" in the DwSimple folder. Add the following in the "ColumnMaker" switch case:
case 6:
Columns = "col-"+ScreenSize+"-2";
break;
As the productlist is a bit more complicated, than just showing products in columns, we will have to do one more adjustment. Open the file "js/ProductListViews.js" in the DwSimple folder (In older versions of Wrap, this is located directly in the Productlist). Then look at the code:
function BoxView() {
var arr = new Array();
arr = document.getElementsByClassName("productlist");
for(var i = 0; i < arr.length; i++)
{
arr.item(i).className = "productlist col-md-2 col-sm-2 col-xs-12";
}
In the code part, as shown above, replace 4 with 2. This makes the switching between columns and listviews work for the end user.