0

I need to add a block on a simple product page which contains a url link to the parent if it exists. Block would be positioned under the short description.

I have seen lots of code examples (some are functions with a protected variable, others straight php code) to get the parent id but no explanation as to which file they should be added to or how they should be called.

  • Please add more information on requirement and post what you've tried ? – Prathap Gunasekaran Apr 15 at 8:45
  • Magento 2.2.6 Porto Theme. – UK_Rogue Apr 16 at 9:08
  • Magento 2.2.6 Porto Theme. example link lilleytileandstone.co.uk/… I have added a link within the short description for what I need. I have tried calling a phtml file into one of the tabs for test purposes using {{block class="Magento\Framework\View\Element\Template" template="Smartwave_Porto::config-link.phtml"}} Test only please ignore</p> This calls the phtml file sucessfully but the code does not work. , either crashing the screen or showing a generic php error. – UK_Rogue Apr 16 at 9:14
  • A bit green i'm afraid! – UK_Rogue Apr 16 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.