cancel
Showing results for 
Search instead for 
Did you mean: 

Moving size options from options.phtml to media.phtml

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Moving size options from options.phtml to media.phtml

I want to call the size options, that is currently residing in 'options.phtml' into 'media.phtml' since I have a specific block that I need it to sit into.

 

I have tried copying and pasting the entire 'options.phtml' page into the block in 'media.phtml' but it didn't work. I also tried calling 'options.phtml' from 'media.phtml' with the following:

 

<?php echo $this->getLayout()->createBlock('core/template')->setTemplate('options.phtml')->toHtml(); ?>


but that also didn't work. I then tried moving the block '/options.phtml' in catalog.xml to appear just after 'media.phtml' but I lost all the labels on my radio buttons (I only had the buttons).

 

Any idea how to do this?

 

1 REPLY 1

Re: Moving size options from options.phtml to media.phtml

@ivcatalina

 

Call the Child html on the product details page with proper object to call this method.

Was my answer helpful? You can accept it as a solution.
200+ Premium Magento 2 Extensions Need help? Hire Magento Developer