Having a little trouble with coupons

Hello All!
I cant seem to get my head around what seems to be such a simple request from my customer.
they have asked for a coupon that can be applied at the checkout and will automatically add a free product to the basket. with the rule that the customer must be at least one product for the coupon to work.

Ive been through the woo commerce coupon settings, we have another neat plugin that does pricing deals really nicely called "varktech - pricing deals".
it has many of the features i need, but will only allow for the use of a coupon OR automatically add free product.

Can anyone suggest a solution?
Luke Hands

  • Zyniker
    • WordPress Warrior

    This sounds more like a bundle than a coupon to me. Does your customer specifically require that the item be added when the coupon is applied at checkout? This would be much easier to do by simply having the item available as a bundle on the primary product's page.

  • Zyniker
    • WordPress Warrior

    Alternatively, if you want to go the coupon route, you could make the promotional item (i.e., the one that is free with the coupon code) a related product (so it will display in the cart when the primary product is added) and then have a banner or notice somewhere on the cart page that "X is free when you use coupon code Y". The combination of the related product link and the coupon code should be sufficient for most visitors.

  • Luke
    • Site Builder, Child of Zeus

    hey Zyniker thank you for getting back to me.

    all i really need here is for a coupon to be entered and this to somehow be used on the invoice that is sent out by woo commerce to the order reciever.
    all that is important is that the customer can see that the coupon has been used on the order.
    to do that ive set up a free product, but that product isnt actually in a category that can be seen on the front end. so thats why i need it auto added.
    but again like i said. all i really need is for the order email to say that the coupon has been applied.
    right now you can look in woo commerce and see if an order has had a coupon applied, but the people at the wharehouse dont have access to that.

    i like how your thinking outside the box i seem to be stuck in!

    Regards
    Luke Hands

  • Zyniker
    • WordPress Warrior

    If all you need is an email stating that the coupon has been applied, it might be possible simply to have a coupon with a value of $0 that will then show on the invoice. Alternatively, automatically adding the product should be possible with a bit of code in functions.php. Unfortunately, I'm not familiar enough with PHP to do that, but I think this thread is probably along the lines of what you'll want: https://wordpress.org/support/topic/add-free-item-to-cart-per-order.

    In essence, you just need a bit of code in functions.php (or somewhere invoked when coupons are applied) that checks IF coupon Y >> add item X. I'm sure a WooCommerce developer (or maybe a helpful person on these forums) could get that code together pretty quickly.

  • Dimitris
    • Support Star

    Hey there Luke, Zyniker,

    hope you're doing good today! :slight_smile:

    First of all, I have to say that I haven't used this plugin. Now, about coupons in emails, here's an example (not tested) on how to add these in confirmation email. The workaround for any case should be similar and require the appropriate email template file. :wink:
    http://www.remicorson.com/woocommerce-display-coupons-used-in-an-order-in-the-confirmation-email/

    Did you try to contact the "varktech - pricing deals" plugin authors for any insights on this?

    If you wish, I can move this thread into our members area for more feedback about this workaround.

    Warm regards,
    Dimitris :slight_smile:

  • Luke
    • Site Builder, Child of Zeus

    thankyou Zyniker & Dimitris

    the code from
    http://www.remicorson.com/woocommerce-display-coupons-used-in-an-order-in-the-confirmation-email/
    worked a treat!
    i used a reward based coupon which gave no rewards, and the code inserted the coupons presence into the new order email the customer gets, Which is exactly what they wanted!

    Thank you both for you interest in my little scene here,
    i really appreciate not feeling like i'm not on my own with this sort of trouble.

    Kind Regards
    Luke Hands

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.