diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 181e4df764f..eee65213689 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -469,7 +469,8 @@ function MoreProducts(moreorless) { if (maxproduct >= 1) { limit = maxproduct-1; } - var offset = * pageproducts; + var nb_cat_shown = $('.div5 div.wrapper2[data-iscat=1]').length; + var offset = * pageproducts - nb_cat_shown; // Only show products for sale (tosell=1) $.getJSON('/takepos/ajax/ajax.php?action=getProducts&token=&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) { console.log("Call ajax.php (in MoreProducts) to get Products of category "+currentcat);