Re: Check if customer is logged in
Originally Posted by
flyvholm
Is there a foolproof way of checking whether a customer is logged in? I had hoped $_SESSION['customer_id'] would do the job, but when checking out with COWOA this variable is set once the customer has entered the billing address.
Background: I've made a row of custom buttons to be displayed at all times. Which buttons should show depends on whether a customer is logged in, and it's not so good that a COWOA customer would appear as having an account and being logged in as soon as they've gone through the first step of supposedly account-less checkout.
if your using the current version of COWOA then you would do the same as what's required for login...
Code:
<?php if ($_SESSION['customer_id'] && (!$_SESSION['COWOA']=='True')) { ?>
A customer is logged on button code here...
<?php } else { ?>
not a customer button code here...
<?php } ?>
Dave
Always forward thinking... Lost my mind!
Bookmarks