- Posts: 57
- Thank you received: 0
Free shipping with Coupon Code
- rockstaran
-
Topic Author
- Offline
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Like it's said in this thread :
I don't see any easy way to do that. That's an interesting feature. We'll add that to the todo list.
You can't add a coupon for free shipping but you can just make a discount of the total amount of the order.
Please Log in or Create an account to join the conversation.
- rockstaran
-
Topic Author
- Offline
- Posts: 57
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Please Log in or Create an account to join the conversation.
- rockstaran
-
Topic Author
- Offline
- Posts: 57
- Thank you received: 0
I can do what, with a plugin?
Please Log in or Create an account to join the conversation.
- rockstaran
-
Topic Author
- Offline
- Posts: 57
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Please Log in or Create an account to join the conversation.
- rockstaran
-
Topic Author
- Offline
- Posts: 57
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- rockstaran
-
Topic Author
- Offline
- Posts: 57
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- rockstaran
-
Topic Author
- Offline
- Posts: 57
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Just change the type to "coupon" and it will work as a coupon, not as a discount.
Please Log in or Create an account to join the conversation.
- rockstaran
-
Topic Author
- Offline
- Posts: 57
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- rockstaran
-
Topic Author
- Offline
- Posts: 57
- Thank you received: 0
I have an idea in using a coupon to provide free shipping.
By default, I can disable the radio button for Free shipping (dynamically via php).
I can create a coupon with 0% or .01% discount and give it a code.
When the user enters this coupon code, the radio button for free shipping will become available (I can check the array or variable that holds the value of coupons and depending if the code was valid or not, i will show the free shipping radio button).
Now my only issue is, what file should I look at that contains the shipping options? also what are the variables available that tell me if a coupon has been added (an array? variable?). Once I know that I think I can do this.
Please Log in or Create an account to join the conversation.
- rockstaran
-
Topic Author
- Offline
- Posts: 57
- Thank you received: 0
rockstaran wrote: Currently I have free shipping as an option when users are checking out (in addition to two UPS options).
I have an idea in using a coupon to provide free shipping.
By default, I can disable the radio button for Free shipping (dynamically via php).
I can create a coupon with 0% or .01% discount and give it a code.
When the user enters this coupon code, the radio button for free shipping will become available (I can check the array or variable that holds the value of coupons and depending if the code was valid or not, i will show the free shipping radio button).
Now my only issue is, what file should I look at that contains the shipping options? also what are the variables available that tell me if a coupon has been added (an array? variable?). Once I know that I think I can do this.
I figured it out!
views\checkout\tmpl\shipping.php
In the For Each loop for $rate, I wrote an IF statement:
if (!$this->coupon->discount_code == "1234" && $rate->shipping_name == "Free Shipping"){
//do nothing, this skips the free shipping radio button if coupon code is not valid
}
else
{
// show the remaining shipping methods
The only thing I have to make sure is that I always title Free Shipping as the manual shipping of $0, and I also set the coupon to .01% so it does not have an affect on price.
It works, let me know if there's a cleaner way you can recommend of me doing this, or any negative side effects of me doing this.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- rockstaran
-
Topic Author
- Offline
- Posts: 57
- Thank you received: 0
It is working great, we have had a few sales go through using the coupon.
The only thing that I would like to modify is the checkout text, it shows the discount amount for the coupon which in this case is .01
Is there a way to not display that in the checkout, but still apply the coupon in the backend?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- rockstaran
-
Topic Author
- Offline
- Posts: 57
- Thank you received: 0
Also
Is there a limit as to how many decimal places I can put for the value of discount amount? I want the coupon to be activated but have minimal affect on price, so i was thinking of putting .0001
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I am having the same issue, I need a coupon for free shipping. I cannot get your hack to work, it breaks the whole page! Can you give me the entire checkout/shipping view code so I can see where I am making my syntax mistake?
Much appreciated if you can help!
Thanks!
Please Log in or Create an account to join the conversation.