Skip to content

Instantly share code, notes, and snippets.

@Sentinel-7
Last active August 6, 2021 07:31
Show Gist options
  • Save Sentinel-7/51a9c89a4e0334b82dd4564dcdc957eb to your computer and use it in GitHub Desktop.
Save Sentinel-7/51a9c89a4e0334b82dd4564dcdc957eb to your computer and use it in GitHub Desktop.
Считаем кол-во выведенных товаров на странице - mFilter2
<div class="mt-textbox">
<p>Showing
<strong id="START">{$_modx->getPlaceholder('mse2_start_page')}</strong> –
<strong id="END">{$_modx->getPlaceholder('mf_limit')}</strong> of
<strong>{$_modx->getPlaceholder('mf_total')}</strong> results</p>
</div>
<script>
$(document).on('mse2_load', function(e, data) {
let page = data.data.page;
let start = page * 9;
let end = page * 9 + 9;
$('#START').html(start);
$('#END').html(end);
console.log(e, data);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment