Override custom option file in your theme
app/design/frontend/namespace/themename/Magento_Catalog/templates/product/view/options/type/select.phtml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
<?php @var $this Mage_Catalog_Block_Product_View_Options_Type_Select ?> <?php $_option = $this->getOption() ?> <?php if ($_option->getTitle()=="testoption1") { ?> <div id="hingebox"> <?php } ?> <?php if ($_option->getTitle()=="testoption2") { ?> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('#hingebox select').on('change', function() { if (jQuery('#hingebox select option:selected' ).text()==0) { jQuery('#hingeoptions').hide(); } else jQuery('#hingeoptions').show(); }); }); </script> <div id="hingeoptions" style="display:none;"> <?php } ?> <dt> <?php if ($_option->getTitle()=="Please select option") { ?> <h3 class="edging-title"><span class="cfg-step">STEP 2</span>Please select testoption <a href="/blog/products/" title="What is option?" target="_blank">What is option?</a></h3> <?php } else { ?> <label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->escapeHtml($_option->getTitle()) ?></label> <?php } ?> </dt> <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>> <div class="input-box"> <?php $valuesHtml=$this->getValuesHtml(); $valuesHtml=str_replace("<ul","<div class='edging-list'",$valuesHtml); $valuesHtml=str_replace("</ul>","</div>",$valuesHtml); $valuesHtml=str_replace("<li","<div class='edging-list-item'",$valuesHtml); $valuesHtml=str_replace("</li>","</div>",$valuesHtml); echo $valuesHtml; ?> <?php if ($_option->getIsRequire()): ?> <?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX): ?> <span id="options-<?php echo $_option->getId() ?>-container"></span> <?php endif; ?> <?php endif;?> </div> </dd> |
[crayon-63d3e5d9c974d176456600/] Using above fucntion Images can be imported directly from...
Override view block using di.xml and add the below code...
You can check a list of called layout XML for...
Follow the below steps to install and set up PWA...
If you want to remove all leading zero's from order,...
Let our Magento expert connect to discuss your requirement.
We offer Magento
certified developers.
Our Magento clientele
is 500+.
We sign NDA for the
security of your projects.
We’ve performed 100+
Magento migration projects.
Free quotation
on your project.
Three months warranty on
code developed by us.