WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Ordering Quantity and Price (4 posts)

  1. Ducanon
    Member
    Posted 1 year 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...

    http://wordpress.org/extend/plugins/woocommerce/

  2. vark
    Member
    Posted 1 year ago #

    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.

  3. Ducanon
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic