Hello, Im using OpenCart 2.1.0.2 and PayPal Express for processing payments.
How can I check if the user is logged in before letting them proceed to checkout when they click the button in the cart and if they aren't, show them a message saying "You're not logged in, please log in to proceed to checkout!".
Thanks in advance!
How can I check if the user is logged in before letting them proceed to checkout when they click the button in the cart and if they aren't, show them a message saying "You're not logged in, please log in to proceed to checkout!".
Thanks in advance!
Hi,
In cart controller you can add
In .tpl file
Of course you can add & load text messages from language file;
In cart controller you can add
Code: Select all
$data['logged'] = $this->customer->isLogged();
Code: Select all
<?php if ($logged) { ?>
// add here image button
<?php } else { ?>
// add here login message
<?php } ?>
In the same way with OC 3.x you can check if customer is logged in
Code: Select all
$this->customer->isLogged()
For further assistance with Opencart Development you can reach me at
asktofaizan@gmail.com | https://asktofaizan.com |
There is a setting in admin => system => settings => options tab => Guest Checkout
Maybe I am missing something ?
Maybe I am missing something ?
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
That's during. The question is before.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I am pretty much pleased with your good work. You put really very helpful information.
MyCardStatement
MyCardStatement
Who is online
Users browsing this forum: No registered users and 414 guests