WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Dynamic Pricing (7 posts)

  1. tlogan
    Member
    Posted 1 year ago #

    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/

  2. scruffy1
    Member
    Posted 1 year ago #

    i think you need a plugin for it to enable pricing structures

  3. bheadrick
    Member
    Posted 1 year ago #

    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);
    	}}
    }
    }
  4. Rinni
    Member
    Posted 1 year ago #

    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!

  5. citynode
    Member
    Posted 1 year ago #

    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/

  6. richie72
    Member
    Posted 1 year ago #

    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/

  7. jstoker
    Member
    Posted 10 months ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic