def recognize_as_registered(self, request=None, commit=True): """ Recognize the current customer as registered customer. """ if self.recognized != CustomerState.REGISTERED: self.recognized = CustomerState.REGISTERED if commit: self.save(update_fields=['recognized']) customer_recognized.send(sender=self.__class__, customer=self, request=request)
def recognize_as_registered(self, request=None, commit=True): """ Recognize the current customer as registered customer. """ if self.recognized != CustomerState.REGISTERED: self.recognized = CustomerState.REGISTERED if commit: self.save(update_fields=['recognized']) customer_recognized.send(sender=self.__class__, customer=self, request=request)
def recognize_as_guest(self, request=None, commit=True): """ Recognize the current customer as guest customer. """ if self.recognized != CustomerState.GUEST: self.recognized = CustomerState.GUEST if commit: self.save(update_fields=['recognized']) customer_recognized.send(sender=self.__class__, customer=self, request=request)
def recognize_as_guest(self, request=None, commit=True): """ Recognize the current customer as guest customer. """ if self.recognized != CustomerState.GUEST: self.recognized = CustomerState.GUEST if commit: self.save(update_fields=['recognized']) customer_recognized.send(sender=self.__class__, customer=self, request=request)