VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: greaves on December 20, 2013, 14:08:52 PM

Title: Shipping estimation
Post by: greaves on December 20, 2013, 14:08:52 PM
Hello,

Do you know how to set up an shipping estimation based on a country ?
This way people could just select a country and see how much are the fees without typing their whole address.

Regards
Title: Re: Shipping estimation
Post by: AH on December 20, 2013, 17:51:58 PM
Which shipping plugin are you using and version ov VM
Title: Re: Shipping estimation
Post by: greaves on December 20, 2013, 18:58:40 PM
I'm using the latest vm version and the default shipping module.
My shipping costs are by country and weight.

Regards
Title: Re: Shipping estimation
Post by: AH on December 20, 2013, 20:01:31 PM
Another question for you

Do you have a lot of countries

If not

Would showing ALL the possible rates (for the particular weight of the cart) in the checkout before an address is completed be of use to you??

So if you had 4 countries, and 1 shipping variant per weight country combo  you would see 4 rates - one for each country

Title: Re: Shipping estimation
Post by: greaves on December 20, 2013, 21:19:39 PM
Yes it would be great
Title: Re: Shipping estimation
Post by: AH on December 20, 2013, 21:31:02 PM
So you can use the existing plugin with a simple hack (this will be lost when you upgrade VM to another version, but should be easy to add)
These are the activities you will need to complete

1. Adjust the shipping plugin in order that it returns a country condition of true when there is no country_id and no address (at the moment it will return false
2. Create a new "view" for the cart in templates/html/com-virtuemart/cart/
3. Adjust the Cart view in order to show the possible rates with the new view
3. Add some CSS to stop the plugin/view showing a selection for the shipping options shown




I can tell you where, but you will need to do them yourself?
Title: Re: Shipping estimation
Post by: greaves on December 21, 2013, 14:58:08 PM
Thx a lot, i'll try and i'll come back if I need help (: