How to show products page hit on product page ?

  • Posts: 50
  • Thank you received: 2
6 years 9 months ago #274193

-- url of the page with the problem -- : localhost
-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.7

as you know we have content hit (page view) on joomla articles

i want to know how to enable this on hikashop products ?

The following user(s) said Thank You: p30yaran

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
6 years 9 months ago #274194

Hi,

You can edit a view file on the product page and add such code where you need it :
<?php echo $this->element->product_hit; ?>

www.hikashop.com/support/documentation/1...-display.html#layout

Last edit: 6 years 8 months ago by nicolas. Reason: code typo fixed
The following user(s) said Thank You: pma

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

  • Posts: 50
  • Thank you received: 2
6 years 8 months ago #274459

I add this code but it does not work :(

I tried it in many places on my own PHP view file, but the result is nothing
I added this code before pricing code or description or product name but there is nothing to show me

I have attached my own PHP view file

File Attachment:

File Name: show_default.zip
File Size:2 KB

Attachments:
Last edit: 6 years 8 months ago by pma.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 8 months ago #274472

Hello,

There is no single reference of any "hit" in your view.
I don't know what you did and what file it is but ; please follow the previous indication and read the documentation link.

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.

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

  • Posts: 50
  • Thank you received: 2
6 years 8 months ago #275494

your code was wrong that i could not get the right result!!! becuse in this code <?php echo $this->element->product_hits; ?> its not "hits" >>> It must be "hit"

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
6 years 8 months ago #275497

Hi,

Sorry for the typo.

The following user(s) said Thank You: pma, p30yaran

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

Time to create page: 0.070 seconds
Powered by Kunena Forum