Date of comment in product page?

  • Posts: 50
  • Thank you received: 1
12 years 5 months ago #51893

Hi,

Is there any way we can insert the date of comment in the voting/comment section of the product page?

For example:

Peter C. on 30 May, 2012 [5 stars]

Any code in particular which we can use to call the date of the comment?

I'm using version 1.5.8 (Business edition).

Thanks.

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

  • Posts: 82820
  • Thank you received: 13366
  • MODERATOR
12 years 5 months ago #51946

Hi,

I forwarded your question to the developer in charge of that. He will answer you tomorrow.

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

  • Posts: 50
  • Thank you received: 1
12 years 4 months ago #55011

Hi Nicolas,

Is there any update to this feature so far? :)

Thanks.

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

  • Posts: 82820
  • Thank you received: 13366
  • MODERATOR
12 years 4 months ago #55062

It seems he forgot to answer you...

You can try to add the code:

<?php
$class = hikashop_get('class.vote');
$vote = $class->get($elt[$i]->vote_id);
echo hikashop_getDate($vote->vote_date);
?>
before the code:
<td class="hika_comment_listing_stars">

in the file 'listing' of the view 'vote' of the front end via the menu Display->Views.

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

  • Posts: 50
  • Thank you received: 1
12 years 4 months ago #56861

Hi Nicolas,

The code works great.

I have another question.

Currently the date format appears as "18 April 2012 21:03". Will there be any code I can insert to remove the time? As we just need the date only, without the time. So as such the date should appear only as "18 April 2012".

Will be there any code to achieve that? Thanks so much for your help so far!

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

  • Posts: 13201
  • Thank you received: 2322
12 years 4 months ago #56864

Hi hawkeyentjc,

You can use the code:

echo hikashop_getDate($vote->vote_date,'%d %B %Y');
Instead of:
echo hikashop_getDate($vote->vote_date);

Last edit: 12 years 4 months ago by Xavier.

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

  • Posts: 50
  • Thank you received: 1
12 years 4 months ago #56937

Thanks Xavier. It works perfectly!

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

Time to create page: 0.434 seconds
Powered by Kunena Forum