I want to echo an attribute from a product on the productpage, but not exactly on view.phtml but in tabs.phtml which is loaded into view.phtml with getChildHtml
.
In view.phtml I can use
echo $_product->getResource()->getAttribute('videotab')->getFrontend()->getValue($_product)
But when I do the same in tabs.html I get the following error:
Fatal error: Call to a member function getResource() on null in
How can I echo the product attribute there? I need to add the data inside a tab, so it needs to be loaded inside tabs.phtml