Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Free products quantity not added to cart
- This topic has 8 replies, 2 voices, and was last updated 6 years, 2 months ago by Soft79.
-
AuthorPosts
-
July 17, 2018 at 9:59 am #3579martin1Participant
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
MartinJuly 17, 2018 at 10:09 am #3580Soft79KeymasterPlease:
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.July 17, 2018 at 10:25 am #3581martin1ParticipantHi 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
MartinJuly 17, 2018 at 10:33 am #3582Soft79KeymasterPlease email it to admin at soft79.nl.
July 17, 2018 at 11:26 am #3583martin1ParticipantDone, Hopefully recieved π
July 17, 2018 at 11:42 am #3584Soft79KeymasterOk, 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
tothemes/YOUR-CHILD-THEME/woocommerce-auto-added-coupons/cart/select-free-product.php
2. In the copied file (in your child theme) search the textwjecf-auto-submit
and remove it.July 17, 2018 at 12:24 pm #3585martin1ParticipantSo far guys, That looks fricking awesome, just waiting on some feedback! Fingers crossed.
That is superb support π
July 17, 2018 at 1:40 pm #3586martin1ParticipantNot that you want it, but I could kiss you guys, thank you, I have been trying to find a solution for that for days π
July 17, 2018 at 2:48 pm #3588Soft79KeymasterPlease, don’t 😀.
-
AuthorPosts
- You must be logged in to reply to this topic.