50cent Posted June 24, 2011 Share Posted June 24, 2011 Hi all,Should be a simple one this.Does a smarty variable exist within prestashop 1.4 for guest status? I want to be able to do something at the checkout based on if the customer is a guest or not.i.e. {if 'is_guest'} // do something here {/if} If not, is there another way to check? I tried adding the following to order.php: // tell smarty if customer is a guest if(Guest::getFromCustomer($id_customer)) { $smarty->assign(is_guest,1); } ...but I'm having no luck.I'm trying to solve the problem of guest customers not being able to change their address once entered.That's another problem in itself!Cheers50cent Link to comment Share on other sites More sharing options...
bellini13 Posted June 25, 2011 Share Posted June 25, 2011 customer has a variable called is_guestso since you have the $id_customer variable, you can do something like $customer = new Customer((int)($id_customer)); if ($customer->is_guest) 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now