By passing a simple variable in your add to cart link, you can apply a coupon code before the item is added to cart.

Add to cart and save 50% off order