Adding A Product Custom Field To Account Page

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
4 years 7 months ago #317762

-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9.16

Hi

I am trying to add a custom field from the table product to the account page. I already have one field from table order which shows as per attachment of the view user / cpanel_orders.php.

<div> <?php echo $order->notes; ?></div>

I now have a text field of eta for the table product , which displays on the product listing and product page. Is it possible to add code so that it also display in the user cpanel? I did try this but it doesn't show <?php echo $product->eta; ?>

Thanks

Dave B)

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 7 months ago #317765

Hi,

The data is not loaded there.
So you need to load it yourself, like this:

$class = hikashop_get('class.product');
$data = $class->get($product->product_id);
echo $data->eta;

The following user(s) said Thank You: davec

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

Time to create page: 0.059 seconds
Powered by Kunena Forum