Post by mikeytrw » Mon Nov 03, 2008 8:28 pm

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

New member

Posts

Joined
Tue May 27, 2008 9:28 pm

Post by bruce » Mon Nov 03, 2008 8:33 pm

It is here as one of the patches.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Qphoria » Mon Nov 03, 2008 8:40 pm

and has also been fixed in 0.8  8)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by bruce » Mon Nov 03, 2008 8:44 pm

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.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Qphoria » Tue Nov 04, 2008 12:19 am

hopefully :)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by mikeytrw » Tue Nov 04, 2008 7:30 pm

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.

New member

Posts

Joined
Tue May 27, 2008 9:28 pm
Who is online

Users browsing this forum: No registered users and 46 guests