Product View Counter in backend product listing !

  • Posts: 129
  • Thank you received: 0
6 years 7 months ago #278357

i was wondering if i can see the hit or view count of a product in backend product listing just after name or price !

Please Log in or Create an account to join the conversation.

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 7 months ago #278360

Hello,

Yes but it would require a view override for the backend product listing (and a bit of PHP code to display the product_hit value.
www.hikashop.com/support/documentation/1...-display.html#layout

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: nic7071

Please Log in or Create an account to join the conversation.

  • Posts: 129
  • Thank you received: 0
6 years 7 months ago #278572

Hi Jerome,
I found out where to insert the code.
but I have no idea of the code that can echo the product hit or view count.

can you tell me if hikashop itself has a code that can echo the hit or view count of a product into backend?
if not can you get me a clue of where to begin to achieve these!

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 81513
  • Thank you received: 13066
  • MODERATOR
6 years 7 months ago #278638

Hi,

It's really simple. On the products listing view file code, next to the display of the product name, you can for example add:
<?php echo $row->product_hit; ?>

The following user(s) said Thank You: nic7071

Please Log in or Create an account to join the conversation.

  • Posts: 129
  • Thank you received: 0
6 years 6 months ago #279133

Thanks,
is there any way i can sort all product by hit count ?

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
6 years 6 months ago #279136

Hello,

If you want to do it through your front-end product listing, you'll just have to set the "Ordering field" option to "product_hit" through your product listing content menu/module configuration page. Else, if you want to change your back-end product listing, some code customization will probably be required.

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum