We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    To remove custom option pricing from the dropdown, you need to add below small piece of code to “select.pthml” file

    Location of “select.pthml” file:

    appdesignfrontendThemesyourthemeMagento_Catalogtemplatesproductviewoptionstypeselect.phtml

    <script>
      require([
        'jquery',
        'domReady!'
    ], function($) {
        $(document).ready(function() {
            $('select.product-custom-option').change(function() {
                $('option').each(function() {
                    var selectedOption = $(this).text();
                    if (selectedOption.indexOf('+') > -1) {
                        selectedOption = selectedOption.substring(0, selectedOption.indexOf('+'));
                        $(this).text(selectedOption);
                    } else if (selectedOption.indexOf('-') > -1) {
                        selectedOption = selectedOption.substring(0, selectedOption.indexOf('-'));
                        $(this).text(selectedOption);
                    }
                });
            });
        });
    });
    </script>

     

    field_5bfb909c5ccae

      Get a Free Quote