Custom field in content module

  • Posts: 328
  • Thank you received: 18
  • Hikashop Business
1 year 10 months ago #351284

-- HikaShop version -- : 4.7.2
-- Joomla version -- : 4

Hi
I try to show custom field (table product) in hika content module. I made an override in product / listing_img_decription file, but no code is working.
For display on product view I use that code (and works well):

<?php  
  if(!empty($this->element->fieldname)) {
	echo '<div class="someclass">' . $this->element->fieldname . '</div>'; 
}
?>

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

  • Posts: 83326
  • Thank you received: 13473
  • MODERATOR
1 year 9 months ago #351290

Hi,

For a listing (module or menu item), it's the same code but with row instead of element

The following user(s) said Thank You: mojweb

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

  • Posts: 328
  • Thank you received: 18
  • Hikashop Business
1 year 9 months ago #351317

Thank you. This works

<?php  
  if(!empty($this->row->fieldname)) {
	echo '<div class="someclass">' . $this->row->fieldname . '</div>'; 
}
?>

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

Time to create page: 0.060 seconds
Powered by Kunena Forum