Forum
Perch Item Index and Pagination
Hi,
I am adding some ecommerce tracking to my Shop site, one feature of which is tracking product views when in a list, part of which is the position of the product. My function looks like this:
perch_shop_products([
'template' => 'products/category_grid',
'sort' => 'priority',
'sort-order' => 'ASC',
'sort-type' => 'numeric',
'count' => 24,
'paginate' => true
]);
I thought I could use perch_item_index
for the product position in the listing, but this resets on each page. Is there a way to get the product's overall position rather than the position on the page?
Thanks for any help
Mike
There isn't, but you can get the page number of course. That should give you the same information.
Ah good thought - yes I could use that combined with the index and a bit of maths. Thanks!