VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: yan77 on August 15, 2021, 08:01:08 AM

Title: Free shipping option for domestic purchases
Post by: yan77 on August 15, 2021, 08:01:08 AM
Hi - I have searched this topic on the forums but I was unable to find an answer, that is why I am creating a new topic.

Basically I have USPS Shipping for Virtuemart plug-in on my virtuemart account and it calculates the shipping for any specific address worldwide. I want to offer free shipping option for domestic customers (US) and keep it as it is for the international purchases (non-US). There is generally more than one option coming up when you go to checkout page as far as shipping, the cheapest one is "Priority Mail", and I want only this option to be free for domestic customers. If they want a faster version, for example "Priority Mail Express", that should still add a shipping cost. Basically, free for domestic customers at "Priority Mail" option, and leave the shipping fees as it is for the rest of options including domestic and international purchases.  Can anyone help me on how to set up this?

Thanks
Title: Re: Free shipping option for domestic purchases
Post by: GJC Web Design on August 15, 2021, 08:16:19 AM
just configure the standard VM weight/country method as free and only for US and label it US Free Shipping
Disable the "Priority Mail" option in the UPS plugin
Title: Re: Free shipping option for domestic purchases
Post by: yan77 on August 16, 2021, 01:01:21 AM
Hi - thank you for your response however probably my lack of knowledge prevented me from understanding what exactly I needed to do. Would you mind providing a bit more detail? When you say VM weight/country method as free, where is it exactly? I could not find any weight / country configuration under configuration or somewhere else. thank you
Title: Re: Free shipping option for domestic purchases
Post by: Jörgen on August 16, 2021, 09:43:41 AM
QuoteVM weight/country method

This shipment method is provided with plain VM and you can use this to create a free shipping option. Note that this is an extra shipping method that with the right setting will appear together with Your UPS method.

Jörgen @ Kreativ Fotografi
Title: Re: Free shipping option for domestic purchases
Post by: GJC Web Design on August 16, 2021, 11:11:44 AM
new shipping method then choose ..
Title: Re: Free shipping option for domestic purchases
Post by: yan77 on August 17, 2021, 06:11:04 AM
perfect - I could make it happen now. Thank you for your patience and answering it.
Title: Re: Free shipping option for domestic purchases
Post by: yan77 on August 17, 2021, 06:53:11 AM
by the way, is there any way to exclude some states in the US? ( we cannot provide free shipping to Alaska, Porto Rico and Hawaii). I see that you can block countries for free shipping but not states. 
Title: Re: Free shipping option for domestic purchases
Post by: GJC Web Design on August 17, 2021, 11:23:30 AM
you would need to adapt the code - clone the weight plugin - rename it and add the code to exclude the states in the checkConditions() function