1

I want to show the number of the product in a specific category. For example, these are my products in a category:

  • Product 1
  • Product 2
  • Product 3
  • Product 4

I know how to get the number of products in this category, but I also want so show the (position) number of the product in the category. So when I am on Product 3, I want to display that I'm on product 3 of the 4 products in this category. I'm not able to do this with position, because I don't want my customer to have to give a position to every single product in every single category.

How do I do this?

  • do you mean a counter like Product 1 - 1, Product 2 - 2, ... Product 39 - 39? – Max Oct 31 '16 at 20:35
  • I mean like a category has for example 10 products and I am on product number 5 in the category. In that case I want to display 5/10. – user3478148 Oct 31 '16 at 20:37
  • they should have the same, fixed number forever? – Bartosz Kubicki Oct 31 '16 at 22:13
  • what do you mean by display 5/10. How exactly you want to show and on which page you want to show? (product listing or product detail page) – Gopal Patel Nov 1 '16 at 7:11
  • I want to display this on the product detail page. So I want to retrieve the position of the product in the category without actually using position in Magento, because 'position' needs to be filled in manually and I don't want to do that to my customer – user3478148 Nov 1 '16 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.