• Resolved animesaulo

    (@animesaulo)


    Is it possible to use the on.checkout JavaScript action to prevent them from checking out unless the total quantity of products is a minimum of 5 products?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter animesaulo

    (@animesaulo)

    Actually, I noticed in the documentation there’s a cart.lineItems.minQuantity JavaScript filter. But, I can’t seem to get it working.

    I use the code example in the documentation:

    wp.hooks.addAction('after.cart.ready', 'wpshopify', function (cartState) {
      wp.hooks.addFilter('cart.lineItems.minQuantity', 'wpshopify', function (
        minQuantity,
        cartState,
        lineItem
      ) {
        return 3;
      });
    });

    But, nothing happens. What is the expected behavior of the code?

    Oh and I’m running version 3.5.10 of the plugin.

    Plugin Author andrewmrobbins

    (@andrewmrobbins)

    @animesaulo

    Working on getting this added to the plugin soon. I need to add a new hook. Hoping to have it ready this week at some point.

    Thread Starter animesaulo

    (@animesaulo)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Minimum Product Quantity’ is closed to new replies.