Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hey Tea Commerce team.
I'm trying to setup a marketing discount code that apply only to certain countries and not all countries.
We want to offer free shipping only within a certain country. How can we do this?
Thanks
Peter
Hi Peter,
If you only have one shipping method (e.g default shipping) per country, then changing the shipping method programatically is quite easy.
However, if you need multiple shipping methods per country, it's back to the drawing board!
1 shipping method per country, with Promo code override
Make a new Shipping Method.
e.g. "Free Shipping"
On the shipping method, update so it's selectable on the Country you require.
The in your code you can:
var freeShippingId = 6; // id of free shipping method var storeId = 1; string code = Request.Form["code"] ?? null; // promo code, where ever it comes from if (code = "Free Shipping") { ShippingMethod shippingMethod = TC.SetCurrentShippingMethod(storeId, freeShippingId); } else { ShippingMethod shippingMethod = TC.SetCurrentShippingMethod(storeId, null); }
That's somewhat basic! But it's a starting point :-)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Tea Commerce Free shipping only in certain country
Hey Tea Commerce team.
I'm trying to setup a marketing discount code that apply only to certain countries and not all countries.
We want to offer free shipping only within a certain country. How can we do this?
Thanks
Peter
Hi Peter,
If you only have one shipping method (e.g default shipping) per country, then changing the shipping method programatically is quite easy.
However, if you need multiple shipping methods per country, it's back to the drawing board!
1 shipping method per country, with Promo code override
Make a new Shipping Method.
e.g. "Free Shipping"
On the shipping method, update so it's selectable on the Country you require.
The in your code you can:
That's somewhat basic! But it's a starting point :-)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.