Jump to content

One Page Checkout - Hide Postage info/issues with saving address


Recommended Posts

Hi all,

 

Another day, another question!....

 

I've been playing with the one page checkout option in prestashop and want to use this for my checkout process.

 

My issue with it is the fact you have to save your address halfway down the page - it is by no means either user friendly or intuitive. I understand technically why this is set up the way it is, and have also seen plenty of other forum posts where shop owners aren't happy with this. My solution so far has been to change the text under the Choose Your Payment section to "Please click on the save button above to view payment options", but this still looks fairly poor.

 

One solution I've thought of, which probably only requires a couple of lines of code, would be for the Delivery Methods and Payment Method boxes to be hidden, and only to appear when the address had been saved. Would anyone know how to do this?

 

I know that there is a module you can buy, but it's a lot of money just to get round this one issue.

 

Anyone with any ideas on how this is done would be greatly appreciated - either what i've mentioned above, or as per the paid versions, having one save button at the bottom once the shipping AND payment options had been selected.

 

Look forward to hearing your ideas :)

 

Dave

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...
  • 2 months later...

Hi,

Which version are you all using? For me, it is already implemented. You should be able to find this in /public_html/controllers/OrderOpcController.php. There is a function in there called _getPaymentMethods.

In my version it checks if the address is saved and the code in my version looks like this:

protected function _getPaymentMethods()
{
 if (!$this->isLogged)
  return '<p class="warning">'.Tools::displayError('Please save your address to see payment methods').'</p>';
 if (self::$cart->OrderExists())
  return '<p class="warning">'.Tools::displayError('Error: this order is already validated').'</p>';
/*  if (!self::$cart->id_customer OR !Customer::customerIdExistsStatic(self::$cart->id_customer) OR Customer::isBanned(self::$cart->id_customer))
  return '<p class="warning">'.Tools::displayError('Error: no customer').'</p>';
*/

 

Maybe you are missing this part and you should include it yourself:

if (!$this->isLogged)
  return '<p class="warning">'.Tools::displayError('Please save your address to see payment methods').'</p>';

 

Hope this helps( don't forget to delete cache etc.)

Edited by barefoot (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...