Page 1 of 1

Default module

Posted: Mon Nov 03, 2008 8:28 pm
by mikeytrw
Hi Guys,

How do I set a shipping/payment module as the default, so if there is only one enabled, it is automatically selected. As this currently not happening on my install.

I see in checkout_shipping.php that default is defined as

Code: Select all

$view->set('default', $session->get('shipping_method'));
So is this only if the user has selected it already? because if it was a configuration thing I would expect it to be $config->get

If this is not configurable then it really should be...

Thanks

Mike

Re: Default module

Posted: Mon Nov 03, 2008 8:33 pm
by bruce
It is here as one of the patches.

Re: Default module

Posted: Mon Nov 03, 2008 8:40 pm
by Qphoria
and has also been fixed in 0.8  8)

Re: Default module

Posted: Mon Nov 03, 2008 8:44 pm
by bruce
Qphoria wrote: and has also been fixed in 0.8  8)
hopefully, you did it like this

Code: Select all

$view->set('default', @$methods[$key]['quote'][$key]['id']);
instead of how shown in the patches to avoid splattering errors on the page in the case of (say shipping), no methods enabled but shipping required for a product.

Re: Default module

Posted: Tue Nov 04, 2008 12:19 am
by Qphoria
hopefully :)

Re: Default module

Posted: Tue Nov 04, 2008 7:30 pm
by mikeytrw
and has also been fixed in 0.8
Happy days


However I hacked it in the tpl

Code: Select all

<?php if ($quote['id'] == $default || (count($methods)==1)) { ?>
However my way is a hack and not a fix at all.