I would like to offer free shipping as an option for my subscibed members. I’m just trying to put it into the subscribing plans, but the only option I have is putting a discount on products, or on product categories. How can I add free shipping as an option and apply it automatically to subscribers carts?
]]>View post on imgur.com
]]>I also make coupons for discounts
I want to exclude free shipping if someone is using a discount coupon, except if its my welcome coupon.
For example
Order > 50$ + no coupon = free shipping
Order > 50$ +coupon = only coupon discount + normal price for shipping
Order 50$ + welcome coupon = both free shipping and discount
How can i set this?
]]>function StageshowFilterDiscount($unused, $cartContents)
{
$discount = 0;
// Loop round all Trolley Entries
foreach ($cartContents->rows as $cartEntry)
{
$showName = $cartEntry->showName; // Show Name
$qty = $cartEntry->qty; // Number of tickets
$cost = $cartEntry->price; // Price per ticket
// Apply discount only to the first ticket of each show
if ($qty > 0) {
// Calculate 33.36% discount for the first ticket
$discountAmount = $cost * 0.3336;
$discount += $discountAmount;
// Display the discount details for the user (optional)
define('STAGESHOWLIB_TROLLEYHTML_ABOVEBUTTONS', '<tr><td><br></td></tr><tr>
<td colspan="6" style="text-align:left"><h2>A DISCOUNT HAS BEEN APPLIED TO YOUR ORDER!</h2></td>
</tr>
<tr>
<td colspan="6" style="text-align:left">You have received a 33.36% discount on the first ticket for each show in your order.</td>
</tr>
<tr><td><br></td></tr>');
}
}
// Uncomment the line below to show the discount amount in the trolley
// echo "Total Discount: $discount <br>\n";
return $discount;
}
add_filter('stageshow_filter_discount', 'StageshowFilterDiscount', 1, 2);
This code works, but applies to the cart regardless of whether a discount code has been used (and when a discount code is submitted, it removes this anyway).
Any help would be greatly appreciated! Thankyou.
]]>For example:
1) from $10 – free shipping;
2) from $50 free shipping and gift;
3) From $100 – free shipping, gift and 10% discount
]]>Also, coupon discounts stopped working since January.
]]>