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!

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 } ?>
Code: Select all
$this->customer->isLogged()
For further assistance with Opencart Development you can reach me at
asktofaizan@gmail.com | https://asktofaizan.com |
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
Users browsing this forum: No registered users and 55 guests