Calculation of default shipping rate based on default country

Started by ZeroPointLabs, May 24, 2015, 09:11:37 AM

Previous topic - Next topic

ZeroPointLabs

VirtueMart 3.0.8, Joomla 3.4.1, PHP 5.5.9

My shipping rules look a bit like this








Ireland0-2 kg10 EUR
Ireland2-5 kg20 EUR
Ireland> 5kg30 EUR
Not Ireland0-2 kg110 EUR
Not Ireland2-5 kg   120 EUR
Not Ireland   > 5kg130 EUR

I have ireland set at the default country by setting the default value of virtuemart_country_id under configuration->shoppper fields

If I create a fresh cart (new session, add product to cart, view cart) I see

  • Bill to, just has Ireland
  • Ship to has "Use the billing address for Shipping" selected
  • In the pricelist area, nothing is select for shipping and the message "We are sorry, no shipment method matches the characteristics of your order." is shown

If I then fill in all the "bill to fields", in the pricelist area I see "Please select a shipment method" with a single radio button for the appropriate shipping method.

I have 2 questions.

1) How do I have the default shipping method selected without having to fill in the "bill to" fields. i.e. get the default address behave like a default address
2) Given each weight range/country combination only has 1 applicable shipping rate, how do I got the cart to auto select it?