Skip to main content

Unrelated custom field

More
13 years 9 months ago #80997 by dynamicvitality
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.

More
13 years 9 months ago #81121 by nicolas
Replied by nicolas on topic Unrelated custom field
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.144 seconds
Powered by Kunena Forum