Woocommerce Free Gift Coupons Plugin

Give away a free item to any customer with the coupon code

With WooCommerce Free Gift Coupons, you can give away a free item(s) to any customer with the correct code. This can be to reward a specific customer or to encourage customers to spend more in order to be eligble for the bonus item.

Start rewarding customers

WooCommerce Free Gift Coupons works very similarly to the other coupon types. Free Gift Coupons allow all the same Usage Restriction and Usage Limits as other coupon types, such as by email address, minimum cart total, etc. However, instead of a discount, the customer is rewarded with a free gift item.

The coupon is redeemed exactly like other coupons. When a coupon is applied successfully, the free gift is automatically added to the cart and the customer may continue shopping or checkout normally.

=== WooCommerce Free Gift Coupons ===

2015.12.08 – version 1.0.9
* Fix: class $version variable
* Tweak: Update WordPress tested against 4.4
* Add: GPL3 license

2015.11.09 – version 1.0.8
* Fix: don’t squash other free shipping coupons

2015.10.13 – version 1.0.7
* Fix: make free shipping specific to free gift only. To use: Free Shipping must be enabled and set to “requires a valid free shipping coupon” if you don’t wish to make the entire order’s shipping free
* New: Add compatibility for adding Subscription as free gift

2015.09.25 – version 1.0.6
* Fix: allow free shipping with free gift

2015.05.06 – version 1.0.5
* Tweak: code improvements in coupon options output

2015.02.03 – version 1.0.4
* WooCommerce 2.3-compatible: switch to Select2

2014.11.12 – version 1.0.3
* Fix “non-static method WC_Free_Gift_Coupons::add_order_item_meta() should not be called statically”

2014.09.11 – version 1.0.2
* Fix “Sorry, this product cannot be purchased.” bug when adding points discount with Points and Rewards extension

2014.07.05 – version 1.0.1
* Fix: wc_add_error() to wc_add_notice()
* Fix: add variation attributes to cart/order if free gift is variation

2014.05.27 – version 1.0
* Initial release

2013.10.31 version 1.0 beta
* Beta release

Sales Page:

http://www.woothemes.com/products/free-gift-coupons/

Download:

Download Now

How to create add to cart button for variable type product

There’s a WooCommerce builtin shortcode to add a product to cart, by default the shortcode works only for simple product, not for variable products, as when using this shortcode you can’t define variations. You can use these two shortcodes [add_to_cart id=’XX’] and [add_to_cart_url id=’XX’] for simple products.

But what if you want to create a “add to cart” button for variable products? Let’s say you want to create a add to cart button for adding X product with Y Size?

Well, you need to add variable product to cart using the URL and create a url similar to this:

http://mysite.com/cart/?add-to-cart=PRODUCT_ID&variation_id=VARIATION_ID&attribute_size=ATTRIBUTE_SLUG

How can you use it?
Best and easy example:

<a href="http://mysite.com/cart/?add-to-cart=9499&variation_id=9561&attribute_size=X">Add To Cart</a>

You can use it by another way

<form action="<?php echo bloginfo('url')?>/cart/" method="get">
<input type="hidden" name="add-to-cart" value="9499" />
<input type="hidden" name="variation_id" value="9561" />
<input type="hidden" name="attribute_size" value="XL">
<button type="submit" class="single_add_to_cart_button button alt">Add To Cart</button>
</form>