Support » Plugin: WooCommerce » Specific Number of items with inventory

Viewing 4 replies - 1 through 4 (of 4 total)
  • So, for example, you want to sell packages of 5 fish, and have the inventory system treat that as 5 fish and not 1 package of 5 fish?

    You can edit the quantity.php template file under single-product/add-to-cart/ (under your theme) and use the step attribute along with a meta field, so it would look something like this:

    <div class="quantity"><input name="<?php echo $input_name; ?>" data-min="<?php echo $min_value; ?>" data-max="<?php echo $max_value; ?>" value="<?php echo $input_value; ?>" size="4" title="Qty" step="<?php echo get_post_meta(get_the_id(),'package_size',true);?>"class="input-text qty text" maxlength="12" /></div>

    if you set meta field “package_size” to a value of 5, then the + button would count by fives.

    Is there a way to make the products have different values? So one could count by 2s and another by 5s.


    yeah, that’s why I suggested you use a postmeta field so you could have different products increment at different rates.

    @ Bheadrick
    Increment working properly)))
    Help please: How can I show the initial default value if it is too different for products?
    How do I use a postmeta field?
    Thank you for the quick response.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Specific Number of items with inventory’ is closed to new replies.