Skip Navigation

[Resolved] How to display the custom fields of a product in the additional info tab

This support ticket is created 4 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 1 voice.

Last updated by hannesU-2 4 years, 10 months ago.

Author
Posts
#1439797

Hi ther Toolset-Team,

I am trying to: display my custom field for a product in a shop in the information tab on the product single page. I have to use a theme my customer wants to use (Aurum). So i added my view in the functions.php like this:
some code with add_filter.... and then:

function woo_custom_information_tab_content() {
echo render_view( array( 'name' => 'view-anzeige-produkt-details' ) );
}

The view is shown on the product details page but it lists the custom fields of all products in the loop...
I think maybe my brain is on a go-slow here....

How can i just show the custom fields of the current product here? i mean something like "Value set by the current page where this View is shown". But this is no option in the filter when i want the view to show products....

or do i just have to add the content template in the functions? I want to use the functions.php, because i do not want to touch the themes single-product. php or whatever that is called 😉

Hope you can help
Thanks in advance
Hannes

#1439839

Ahhhh.... My issue is resolved now.
I used echo render_view_template( ID of template ); and it works.