Shipping Methods Shown at Checkout Options

  • Posts: 37
  • Thank you received: 0
11 years 5 months ago #106558

Hi

Is it possible to have no shipping methods options show in checkout until the address is entered?
Some customers are not realising they have to press the ADD button in order to view all the shipping options for their respective shipping address. :huh:

(We currently have no registration required, just guest checkout and all options on the one page)

Thanks

Marisa

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 5 months ago #106576

Hi,

You can probably edit the view "checkout / shipping" and use a session var, get the session var value, if empty, hide the shipping method, then set a value for this session var, if the session var is set display the shipping method.
When submitting the address form, the page is loaded again, that's why you can probably use a session var.

$app = JFactory::getApplication();
$first = $app->getUserState('address_set',false);
$app->setUserState('address_set',true);
if($first == false){
  // hide the shipping
}else{
  // display the shipping
}

Please Log in or Create an account to join the conversation.

  • Posts: 37
  • Thank you received: 0
11 years 4 months ago #108267

Thanks, This worked.

The only hiccup is if someone goes to the cart and presses refresh BEFORE entering their address details, the shipping shows up again. This is not a big deal but any suggestions to fix this would be appreciated. (There's always 1 dummy custmoer who will do it and get confused!)

Thanks

Marisa

Please Log in or Create an account to join the conversation.

  • Posts: 82727
  • Thank you received: 13342
  • MODERATOR
11 years 4 months ago #108379

It's better to simply change the checkout workflow option of the configuration so that you have a first step for the login/registration/address and a second one with the rest.
That way you won't need to change any code.

Please Log in or Create an account to join the conversation.

  • Posts: 37
  • Thank you received: 0
11 years 4 months ago #108396

Yes, I figured that was the only other option. Thanks. I will try this for a while to keep it all on the same page and reassess later.

Cheers!

Please Log in or Create an account to join the conversation.

Time to create page: 0.070 seconds
Powered by Kunena Forum