Repository Forums Support WooCommerce Extended Coupon Features PRO Free products quantity not added to cart

Topic Resolution: Resolved
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #3579
    martin1
    Participant

    Hi Guys,

    I love your plugin, it adds some much need flexibility to woocommerce coupons. Unfortunately there is one feature I want to use, but it doesn’t seem to work correctly.

    So, I have set up an offer, buy products (minimum 12) to get a choice of free products up to the amount purchased. This all appear to work correctly. i.e. it shows the products to choose with a quantity field, but when i add the free products(update cart) the cart and checkout only display 1 product and more importantly on the order confirmation there is only 1 of each product displayed. šŸ™

    I understand that the ‘allow multiplication of free products’ is marked ‘experimental‘, but I don’t suppose you have a fix. I have two imminent promotions to run using this exact setup.

    Thanks in advance
    Martin

    #3580
    Soft79
    Keymaster

    Please:

    1. Temporarily enable Settings > WC Extended Coupon Features > Debug mode
    2. On the couponā€™s miscellaneous tab download Coupon as JSON and paste it here
    3. Send me an url to your store and instructions to reproduce this issue.

    #3581
    martin1
    Participant

    Hi There,

    Thanks for your speedy response: (JSON Below)

    
    {"result":"ok","coupons":{"coupon_id":69503,"coupon_code":"disneytest2","meta":{"_edit_last":"","_edit_lock":"","_vc_post_settings":{"vc_grid_id":[]},"_wjecf_allow_cart_excluded":"no","_wjecf_allow_enqueue":"yes","_wjecf_apply_discount_to":"all","_wjecf_apply_silently":"no","_wjecf_bogo_matching_products":"no","_wjecf_categories_and":"no","_wjecf_custom_fields_and":"no","_wjecf_first_purchase_only":"no","_wjecf_free_product_ids":"35697,35649,35669,35653","_wjecf_is_auto_coupon":"no","_wjecf_min_matching_product_qty":"12","_wjecf_multiply_free_products":"yes","_wjecf_must_select_free_product":"yes","_wjecf_products_and":"no","_wjecf_select_free_product_message":"Please choose your free frames:","coupon_amount":"","customer_email":"","date_expires":{"date":"2018-08-31 00:00:00.000000","timezone_type":1,"timezone":"+00:00"},"discount_type":"fixed_product","exclude_product_brands":[],"exclude_product_categories":"","exclude_product_ids":"","exclude_sale_items":true,"expiry_date":"","free_shipping":false,"individual_use":true,"limit_usage_to_x_items":null,"maximum_amount":"","minimum_amount":"","product_brands":[8682,8683,8689,8693],"product_categories":[],"product_ids":[],"slide_template":"default","usage_count":0,"usage_limit":0,"usage_limit_per_user":0}}}
    

    The only issue I have is that the site is business to business (b2b) and you have to be registered and logged in to purchase šŸ™

    The site is http://internationaleyewear.co.uk.

    I can make you a user, but it would have to remain private i.e. not published on this forum.

    Thanks again
    Martin

    #3582
    Soft79
    Keymaster

    Please email it to admin at soft79.nl.

    #3583
    martin1
    Participant

    Done, Hopefully recieved šŸ™‚

    #3584
    Soft79
    Keymaster

    Ok, two things:

    – With your current configuration one free item can be added for every 12 products in the cart. I.e. if 24 items are in the cart, the customer can add two free items. Paste this snippet in your child theme’s functions.php to change this behaviour (untested):

    
    add_filter(
      'wjecf_free_product_amount_for_coupon',
      function ( $amount, $coupon ) { 
        if ( $coupon->get_code() === 'disneytest2' && $amount >= 1 ) { 
          $amount = WJECF()->get_quantity_of_matching_products( $coupon, $wc_discounts ); 
        }
        return $amount;
      }, 10, 2
    );
    

    – The form is currently configured to auto-apply which doesn’t work really well in your case. Try this:

    1. Copy plugins/woocommerce-auto-added-coupons-pro/templates/cart/select-free-product.php to themes/YOUR-CHILD-THEME/woocommerce-auto-added-coupons/cart/select-free-product.php
    2. In the copied file (in your child theme) search the text wjecf-auto-submit and remove it.

    #3585
    martin1
    Participant

    So far guys, That looks fricking awesome, just waiting on some feedback! Fingers crossed.

    That is superb support šŸ™‚

    #3586
    martin1
    Participant

    Not that you want it, but I could kiss you guys, thank you, I have been trying to find a solution for that for days šŸ™‚

    #3588
    Soft79
    Keymaster

    Please, don’t 😀.

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