- Posts: 447
- Thank you received: 20
Adding A Product Custom Field To Account Page
6 years 5 months ago #317762
by davec
Adding A Product Custom Field To Account Page was created by davec
-- 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.
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
-- 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.
Code:
<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
Please Log in or Create an account to join the conversation.
6 years 5 months ago #317765
by nicolas
Replied by nicolas on topic Adding A Product Custom Field To Account Page
Hi,
The data is not loaded there.
So you need to load it yourself, like this:
The data is not loaded there.
So you need to load it yourself, like this:
Code:
$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.186 seconds