where to add a function() for Prodct listing page

  • Posts: 490
  • Thank you received: 2
8 years 6 months ago #256939

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.5

hi

i need to add a function which i named time_ago that will call product_created for the view = product / listing_img_title.

My objective is to add the creation date of the products in listing_img_tile or products listing page. i dont know which file to add this to avoid duplicate php functions

thanks

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

  • Posts: 83995
  • Thank you received: 13605
  • MODERATOR
8 years 6 months ago #256943

Hi,

The easiest is to put it where you want and use such code:

if(!function_exists('time_ago')){
 function time_ago(){
  // code of your function
 }
}
That way it won't bug you with the function being duplicated.

The following user(s) said Thank You: ronron

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

Time to create page: 0.054 seconds
Powered by Kunena Forum