Hello.
Currently I’m working on a big ecommerce site integrated with Navision. It’s important to us, and the customer, that we have good performance on the site. On the FrontPage we have a box with 4 tabs each of these tabs renders a different product group list. We don’t want to have page refresh when a user clicks on one of the tabs and we don’t want to loads all 4 product groups and just hide the divs. The reason for this is that every product in the list does a live price calculation @ Navision and this is a bit “expensive”. Therefor the solution I have made is a custom module where u can define a GroupID, tab name and the productListTemplate. I also have a “active” checkbox so I know which one to render on page load. When a user clicks a tab I do a ajax request to the server with the GroupID. This all works quit fine. But now I’m stuck at the paging part. This is the method I use when rendering list.
Group g = new Group(groupID);
ProductCollection pg = Product.getProductsFromGroup(g);
Renderer r = new Renderer(Pageview, ParagraphRow);
r.ParagraphSettings.PageSize = 8;
r.ParagraphSettings.TotalProductCount = pg.Count;
r.ParagraphSettings.PageSizeBack = 1; //test
r.RenderProducts(pg, productListTemplate);
htc.Response.Write(productListTemplate.Output());
htc.Response.End();
By reflection the DW code I found out that PageSize is the one set in the standard eCommerce Catalog for how many products we want per page and TotaltProduct Count, well yes is the total product count. Total works fine, but I can’t seem to get the PageSize to work? No matter what I do, it just renders all products. And for some reason it always writes xx products found Page 2 of 4. This 2 of 4 – and I can’t seem to figure out what I’m missing.
It would also be cool if I could make this paging work with ajax.
Any ideas?
Thanks!