Unrelated custom field

  • Posts: 35
  • Thank you received: 2
11 years 11 months ago #80997

I apologize for so many posts. The answer to this, im sure, is pretty simple. I need to insert the data from a custom field of a different product.

I know how to insert a custom field from the current product: <?php echo $this->row->custom_field; ?>

But I need to do (otherproduct)->row->custom_field; somehow. I realize i need to call upon the data, so it will be a bit more complicated.

Thanks for your help,
Carey

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

  • Posts: 82818
  • Thank you received: 13360
  • MODERATOR
11 years 11 months ago #81121

It's like that:
$class = hikashop_get('class.product');
$prod = $class->get(19);
echo $prod->custom_field;

where 19 is the id of the other product.

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

Time to create page: 0.037 seconds
Powered by Kunena Forum