Repository Forums Support WooCommerce Extended Coupon Features PRO Multiple free products added to cart

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2087
    webaruhazbirodalom
    Participant

    Hi,
    we have some problems with the plugin.
    The campaign I’m trying to set is: buy 2 get 1 free from the same item, auto applied and multiplied, so if someone buys 10, gets 5 free.

    Now if 2 random items are added to cart,
    – they get free items from those random items,
    – they get the wrong amount (e.g. buy 3, get 3 free).

    Here are pictures of the cart and the settings. I can get you access to our staging environment for the bugfix.



    #2088
    Soft79
    Keymaster

    Default behaviour for BOGO + multiplication is like that. You can use a filter to change the amount:

    
    add_filter( 'wjecf_bogo_product_amount_for_coupon', 'wjecf_bogo_product_amount_for_coupon', 10, 2 );
    
    function wjecf_bogo_product_amount_for_coupon( $amount, $coupon )
    {
      if ( $coupon->code == 'COUPON_CODE_HERE' ) { $amount = intval( $amount / 2 ); }
      return $amount;
    }
    
    #2090
    webaruhazbirodalom
    Participant

    Without adding any code how can I get this done:

    If the visitor adds 2 specific items to the cart, gets one free, multiplied, so if 4 added, get 2 free?

    #2091
    Soft79
    Keymaster

    Not possible. You can use this alternative:

    Discount: 100%
    Products: the product(s) this offer should apply to
    Minimum qty of matching products: 3
    Limit discount to: Every nth item

    This will make every 3rd item free

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.