Select first shipping method in list as default

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

Select first shipping method in list as default

Postby loppan » Thu Mar 01, 2018 12:24 pm

Hi,

I know that I have the option to set the default shipping method on my checkout page as "none", the cheapest or the most expensive one.

I would actually like to have the first shipping method on my list (set by "List Order" in VM shipping methods config) selected as default.

I used to have the most expensive option selected as default, but now I'm configuring a new shipping method that - depending on the weight - can be amongst the cheapest of my availble methods - and this is the one I want my customers to chose, because it's safe and hassle free on my part ;).

Is there a quick and dirty way to achieve this? For now I have it set to "None", it works, but I would much prefer to have the first method in my list selected instead :).

Best wishes

Peter
loppan
 
Posts: 25
Joined: Thu Oct 27, 2016 7:26 am

Re: Select first shipping method in list as default

Postby admin » Thu Apr 12, 2018 1:59 pm

hello Peter, if you are in EU, it's quite possible that it's required by law "not to preselect" any shipping or payment by default so that customer must always click a method to choose from - for this case there is the "none" which creates a new "invalid" option of "please choose a shipping method" that can be shown as radio or drop down (if tranform is used).

it's quite complicated to choose the first one since there are complex methods which may not render the code as the standard weight countries. also opc cannot know which one is the first one without calling the function to display it (and thus run "check conditions" ) if opc did this twice redering would be twice slower.

best regards, stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 3 on Joomla 3.x

cron