Ordering Quantity and Price (4 posts)

  1. Ducanon
    Posted 3 years ago #

    Hey there,

    The products on my site are all priced as single products but many of them come in set ordering quantities... does anyone know how I can force the customer to order a multiple of the set ordering quantity but keep the prices per product...


  2. vark
    Posted 3 years ago #

    How about setting up variations as follows:
    variation 1 - qty 1
    variation 2 - set qty * 1
    variation 3 - set qty * 2
    Then set up a little jquery to always protect the qty 1 1st variation when displaying the product price. I believe this should show the single unit base price throughout the system as the 'from' price, but prevent the purchase of the non-set quantities.

  3. Ducanon
    Posted 3 years ago #

    Thanks for your quick reply !..
    I don't have any knowledge of jquery other than using it to get a slider to work and such...and I'm not sure how to set it up the way you explain...

  4. vark
    Posted 3 years ago #

    So, you would name the value of the qty=1 variation to be let's say QTY1 across all your products which need to be sold by set. The javascript would then be something like:

    jQuery(document).ready(function($) { 
    //Using this jQuery, the QTY1 option would be disabled.
    $("select option").each(function() {
        var $thisOption = $(this);
        var valueToCompare = "QTY1";
        if($thisOption.val() == valueToCompare) {
            $thisOption.attr("disabled", "disabled");
    }); //end ready function

    You'd attach this JS to each detail product page. As the value QTY1 would be unique to your set-based products, no other products should be affected. Untested, ymmv.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic