How to enable checkbox by default checked in Custom Option?
-
23-12-2020 - |
Решение
You can't do that using available default options. You have to write jQuery to set the input box as checked. Please find some hints below:
open app/design/frontend/base/default/template/catalog/product/view/options/type/select.phtml
and Copy this file to your theme folder and put below jQuery code at the end of this file
<script type="text/javascript">
jQuery(".checkbox").prop( "checked", true );
</script>
You also need to add jQuery support in case its not already added. Additionally you can set input box checked only when your conditions match to set it as checked in jQuery.
Не связан с magento.stackexchange