Viewing 13 replies - 1 through 13 (of 13 total)
  • coolhatwebdesign

    (@coolhatwebdesign)

    I have the exact same issue – I’d like to enforce the quantity rule for products under a select category for visitors, not for logged in users. Is it possible to set rules accordingly?

    Plugin Author Bryan Purcell

    (@purcebr)

    Hey Guys – Just a heads up. I’m working on the feature now, and should have a fix posted as a plugin update soon.

    coolhatwebdesign

    (@coolhatwebdesign)

    Sounds good! please do keep us posted, subscribing to this thread.

    coolhatwebdesign

    (@coolhatwebdesign)

    A followup question for you: can the minimum quantity apply to the total quantity in the customer’s cart, or does it have to apply per item?

    Plugin Author Bryan Purcell

    (@purcebr)

    Since we’re performing the validations on a per-line-item basis, the calculation currently applies per item, not per cart. I like the idea of a checkbox to toggle per item versus total from the category matched products in the rule settings, though

    coolhatwebdesign

    (@coolhatwebdesign)

    It would definitely be nice to be able to toggle between per item vs total in cart. If it’s not a huge hassle to put into a future release, that would be a great new feature.

    Any updates on whether the next version of the plugin will include quantity rules for site visitors along with authenticated users?

    Plugin Author Bryan Purcell

    (@purcebr)

    Hey Coolhat –

    Yeah – this feature is finished. I’m just sorting out some plugin repo access issues so I can push it up as an update.

    Plugin Author Bryan Purcell

    (@purcebr)

    Hey Guys – just pushed the update w/ a fix for the role selection we were seeing, and a guest option. Can you please give it a try and let me know how it’s working?

    thanks!
    Bryan

    So it looks like the min quantities for a category does go into effect for a Guest. However, the guest can’t remove all the products from the cart, even setting a quantity of 0 and then clicking Update Cart has no effect because the minimum quantity gets replaced in the qty field right away. So for the one category (and its sub categories) has a minimum quantity of 12 items during checkout, I can’t (as a guest) just remove the item from my cart at all. If I use the incremental qty buttons and increase the amount in my cart to say, 13, that works fine. But if I were to decrease the amount from 13 to 11, it won’t work at all, just be stuck at 12.

    Maybe it’s just my theme, since I’d love to have a button on the cart widget and cart page that just clears the cart completely, but I’m not seeing one right now so manually changing the amount in the quantity is the only method I have right now for a customer to control their cart qty or remove items.

    Another note – if I set a step value of 12, I can increase the quantity in my cart by 12 so I can order at least 12, and increase to 24, 36, etc. However, I can’t decrease the min amount in my cart to 0 and then hit update in order to remove it from my cart.

    I’ve found a nice snippet for setting up an Empty Cart button (I’ll add the code below for anyone interested) and using that in conjunction with your plugin seems to work quite nicely. I (along with anyone else who subscribes to this thread) sincerely appreciate your work on this plugin, this is a really great update!

    To add Empty Cart:

    In functions file:

    add_action('init', 'woocommerce_clear_cart_url');
    function woocommerce_clear_cart_url() {
    	global $woocommerce;
    	if( isset($_REQUEST['clear-cart']) ) {
    		$woocommerce->cart->empty_cart();
    	}
    }

    In cart.php (under the Templates folder – recommended to make your own cart template instead of editing the core Woocommerce template files):

    <input type="submit" class="button empty-cart" name="clear-cart" value="<?php _e('Empty Cart', 'woocommerce'); ?>" />
    <?php do_action('woocommerce_proceed_to_checkout'); ?>
    <?php do_action( 'woocommerce_after_cart_table' ); ?>

    In your stylesheet you can edit the style for the class empty-cart to style the button however you like.

    Thanks again!

    I am having problems setting the minimum purchase for roles.

    In my store I have the minimum purchase of 1 for customers and a minimum purchase of 12, with the purchase of increments of 12 for wholesale customers.

    When logging in as a wholesale customer I am still getting increments of 1, not 12. Can somebody help me with this. I’m not sure what I am doing wrong.

    Please use the following:
    https://kristinandco.com/wp-login.php
    UN: brabedioux
    PW: password0813

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Quantity rule for visitors’ is closed to new replies.