Support » Plugin: WooCommerce » Ordering Quantity and Price

Viewing 3 replies - 1 through 3 (of 3 total)
  • How about setting up variations as follows:
    variation 1 – qty 1
    variation 2 – set qty * 1
    variation 3 – set qty * 2
    etc
    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.

    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…

    Hi,
    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.noConflict();
    
    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.

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