Hi,

i have a suggestion for an alternative way to handle users in eShop:

Currently, if a user is registered you have the oxcmp_user object and the "getUser()" method of oxsession return a user. If a user isn't registered, you get "null".

What if we would have a user object which is permanently there, regardless of the login state. If a user isn't logged in, you have an dummy user which doesn't appear in db and which only purpose is to represent unregistered users.

Now you have to implement user dependant stuff like this:

$user = oxSession::getInstance()->getUser();

if ($user === null) {
    if($user->isBigCustomer() === true) {
        // do something big
    }
}

with a dummy:

if (oxSession::getInstance()->getUser()->isBigCustomer() === true) {
   // do something big
}

Even further, you could assign Shipping Sets much better (with the addition of an "unregistered" usergroup which every unregistered customer).

If you want to assign a shipping set to unregistered users and to users which are in the group "not yet ordered" you have to create 2 shipping rules for the same purpose. With the dummy user and his group, this isn't necessary anymore.

Feel free to discuss :)


_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to