Hello,
You can create a view override of the `show_quantity` template to replace the quantity input with a checkbox when the global add-to-cart mode is used on listings.
Go to System > HikaShop > Display tab and edit it. In the override file, add the following code after the line `$min_quantity = 0;`:
if(!empty($this->global_on_listing)) {
?>
<div class="hikashop_quantity_checkbox_div">
<input type="checkbox" id="<?php echo $id; ?>_checkbox" onchange="document.getElementById('<?php echo $id; ?>').value = this.checked ? 1 : 0;" />
<input id="<?php echo $id; ?>" type="hidden" value="0" class="hikashop_product_quantity_field" name="<?php echo $name; ?>"<?php echo $formAttr; ?> />
</div>
<?php
return;
}
This renders a simple checkbox that sets the hidden quantity field to 1 when checked and 0 when unchecked. The global add-to-cart button on the listing will then add only the checked products to the cart. On the product page, the normal quantity display will still be used.