I've enabled all required modules and the test payment gateway. When I checkout the form keeps asking me for an email address. When I enter one a "Login" link appears but I'm already logged in.

At first I had only one type of user at admin/ecsettings/ctype/list but after enabling the Address a second type appeared. This didn't change anything in the checkout process though.

In the code the following determines the customer type:

function ec_customer_checkout_init(&$txn) {
  if (empty($txn->customer)) {
    $txn->customer = ec_customer_get_customer(isset($txn->ecid) ? $txn->ecid : NULL);
  }

Since ecid isn't set NULL is passed. This will then call ec_anon_customer_get_id which returns an anon user and then ec_customer_user_customer_get_id which returns:

array
  'type' => string 'user' (length=4)
  'exid' => string '1' (length=1)

This is then validated with if ($return = _ec_customer_find($customer)) {. But since the ec_customer table doesn't have a field exid and there isn't an entry user this returns a false.

Could it be that there is some mixup in the usage of ecid and exid?

Comments

jax’s picture

Some additional info:
I'm also using ec_paperpayments since I don't want to use any payment gateway.

gordon’s picture

Status: Active » Closed (works as designed)

This is because you have only installed ec_anon, and not another customer module.

If you install ec_address customers who are logged in will be recognized.

jax’s picture

Status: Closed (works as designed) » Active

Gordon, I did activate the address module but users who are logged in are still not recognized. I did explain that in my original support request but maybe I wasn't clear enough. Is there a specific setting to turn users in customers?

As user 1 I've added an address and the checkout still thinks I'm anonymous.

jax’s picture

Title: Checkout keeps thinking I'm an anonymous customer » Clarify that the order of types of customers is important and what it does
Category: support » task

I've found a solution. When you change the order of customer types at admin/ecsettings/ctype/list and put User at the top of the list I'm recognized as a user. If that is the way it should work I suggest to add a message on this page to clarify this.

I've changed this to a task to add a clarification.

gordon’s picture

Title: Clarify that the order of types of customers is important and what it does » Checkout keeps thinking I'm an anonymous
Category: task » bug
gordon’s picture

Version: 6.x-4.0-rc17 » 6.x-4.x-dev
Status: Active » Fixed

basically the problem is that the anonymous customer type should always come last, and in your case the weight got set so that it was before the user customer types so all new customers were being treated as anonymous instead of a user.

I have made changes to this so that anonymous will always come last no matter what.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.