Posts

Restricting number of checkboxes selected by customer in Opencart

Date Tested:  13 November 2017 Version: Opencart V2.3.0.2 Situation: In Admin, after adding checkboxes as an option, there is no option to input a limit on the number of checkboxes a customer can tick. Objective:  Add a text field where admin can enter that number as stated above. Users must check that number of checkboxes, not more, not less. Number of Files to modify: 2 + 1 database 1) admin / view / template / catalog / product_form.tpl 2) admin / model / catalog / product.php 3) admin / controller / catalog / product.php 4) catalog / controller / checkout / cart.php 5) catalog / model / catalog / product.php 6) catalog / controller / product / product.php 7) Add a column called checkboxmaxchecks to database table: db_product_option MODIFICATION: 1) admin / view / template / catalog / product_form.tpl Only pasted partial file in textareas below, find and replace <div class="form-group"> <la