October 31, 2018 at 12:36 am #4031
I have PRO and have set up an auto free product. It’s set to be added to the cart when one purchases $60 or more of product. Problem is it’s not adding to the cart.October 31, 2018 at 8:19 am #4033
Please verify that the product in stock and has a price.
If that doesn’t solve it, please:
– Send me the url to the free product
– Send me the coupon code.
– Temporarily enable settings > WooCommerce Extended Coupon Features > Debug mode (then I can see the coupon settings by adding ?wjecf_dump=coupon_code to the url)October 31, 2018 at 7:59 pm #4041
I actually need the coupon to apply to any product. So it should work like this, if you purchase any $60 worth of products, you get a free diploma and bag. So all the products are in stock and have prices.
This is the free product: http://www.sexxuniversity.com/product/free-msa-diplomas-sexx-university-gift-bag/
Coupon name auto-free-diploma-bag
Debug mode is now enabled.
Thanks!October 31, 2018 at 8:04 pm #4042
That url yields:
“Page not found! Something has gone wrong. Sorry about that!”
Is the product private? Then it won’t work…October 31, 2018 at 8:05 pm #4043
Sorry, forgot to take it off private. Please try now.October 31, 2018 at 8:25 pm #4044
Cart crashes when the coupon is applied. Probably because it’s not a normal WC product, I see that a name can be entered for this product. Do you get any errors in the error log?October 31, 2018 at 8:32 pm #4045
What if I switch Coupon data > Free products > to the two actual products? I just did that. So now the free products are these two:
Still didn’t add them to my cart?
Do you want me to copy in the log?October 31, 2018 at 8:47 pm #4046
Product 1418 (http://www.sexxuniversity.com/product/msa-diplomas/) is not a normal product.
Yes, please share the log. You can mail it to admin at soft79.nl.October 31, 2018 at 9:49 pm #4047
The issue was the WooCommerce Product Addons plugin. It uses the filter woocommerce_add_cart_item_data and expects an argument that was added in WC 3.3.0. I will add this argument in the next release.
A quick fix would be changing wp-content/plugins/woocommerce-auto-added-coupons-pro/pro/plugins/WJECF_Pro_Free_Products/WJECF_Pro_Free_Products.php line #693:
$cart_item_data = (array) apply_filters( 'woocommerce_add_cart_item_data', $cart_item_data, $product_id, $variation_id );
$cart_item_data = (array) apply_filters( 'woocommerce_add_cart_item_data', $cart_item_data, $product_id, $variation_id, $quantity );
- You must be logged in to reply to this topic.