Support » Plugin: WooCommerce » Dynamic Pricing

  • I cannot get a response from Woo on this so I am hoping someone here may be able to answer.

    I have imported 1200 products and 300 of these products have a quantity discount. If they buy 12 or more there is a 25% off. Is there a way to import these discounts without having to add the discount by each product?
    We do not use categories, so the discount is on individual SKUs.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • i think you need a plugin for it to enable pricing structures

    The out of the box functionality only allows you to define a minimum order amount for a coupon – not a minimum quantity, and there’s no functionality in the UI to make a coupon auto-apply.

    Oh, and I just noticed that you only want it to apply to a specific set of items. You don’t have to display your categories, but you really should define a category for this so you can make the coupon only applicable to a select set of items.

    Also, you need to group the items in some way.

    Otherwise, you’ll have to define all 300 in some sort of list.

    If you want incredibly flexible dynamic pricing without adding any code, the dynamic pricing extension is the way to go, but it’s a bit pricey.

    You can code it using a hook like so:

    add_action( 'woocommerce_add_to_cart', 'wooqty_action', 30 );
    
    function wooqty_action(){
    global $woocommerce;
    //checking each item in the cart
    foreach ( $woocommerce->cart->get_cart() as $cart_item_key => $values )      {
    //you can replace prod_cat with another taxonomy name if you wish
    $terms = get_the_terms( $values['product_id'], 'prod_cat' );
    $found = false;
    //checking if this item is in the taxonomy term we define here
     foreach ($terms as $term) {
    if($term->name == 'category-slug') $found=true;
     }
    //if it is...
    if($found){
    //this is the slug of the coupon code you define in the wc dashboard
    $coupon_code = 'randomquantitydiscount'
    	//checking whether the line item quantity is at least 12
    	if($values[quantity']>=12){
    
    		$woocommerce->cart->add_discount($coupon_code);
    	}}
    }
    }

    Don’t know if you solved the problem yet but maybe this is what you’re looking for?
    http://webpresencepartners.com/2012/09/19/a-free-simple-woocommerce-csv-importer/
    good luck!

    Dynamic Pricing extension is supposed to work for things like that. It’s $99 for a license.

    I haven’t bought that one, or used it so I can’t swear to it’s functions, but … here is the link:

    http://www.woothemes.com/products/dynamic-pricing/

    richie72

    (@richie72)

    Does anybody know if its possible to use the dynamic pricing plugin in a reversed way? Instead of doing discounts add a percentage on the price?

    http://wordpress.org/extend/plugins/woocommerce/
    http://www.woothemes.com/products/dynamic-pricing/

    maybe a bit late to reply but yes dynamic pricing plugin does work in the reverse way, if you add a negative value, for example -20% or -0,20

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Dynamic Pricing’ is closed to new replies.