Repository Forums Support WooCommerce Extended Coupon Features PRO Free product not showing in cart

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

    Hi,

    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.

    #4033
    Soft79
    Keymaster

    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)

    #4041
    ahefter
    Participant

    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!

    #4042
    Soft79
    Keymaster

    That url yields:

    “Page not found! Something has gone wrong. Sorry about that!”

    Is the product private? Then it won’t work…

    #4043
    ahefter
    Participant

    Sorry, forgot to take it off private. Please try now.

    #4044
    Soft79
    Keymaster

    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?

    #4045
    ahefter
    Participant

    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:

    http://www.sexxuniversity.com/product/msa-diplomas/
    http://www.sexxuniversity.com/product/sexx-university-gift-bag/

    Actual products.

    Still didn’t add them to my cart?

    Do you want me to copy in the log?

    #4046
    Soft79
    Keymaster

    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.

    #4047
    Soft79
    Keymaster

    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 );

    to:

    $cart_item_data = (array) apply_filters( 'woocommerce_add_cart_item_data', $cart_item_data, $product_id, $variation_id, $quantity );

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