Author Topic: Guest checkout - Assigned Customer ID is always 0  (Read 6832 times)

Offline Philipp82

  • Newbie
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
Guest checkout - Assigned Customer ID is always 0
« on: July 26, 2017, 04:25:29 PM »
Hi

I have been using AbanteCart for a while and everything works great, thank you for the great product! Today I unfortunately encountered a problem I need your help with.

I am using the cart embedded in my webpage and when I select "Guest Checkout" (on the embedded login page after the shopping cart) and then click "Continue" i get an error message which reads "Unknown error encountered. Please try again!" If i click "Guest Checkout" again and press submit it works and I get to the next page (Guest checkout page 1)

However I am then encountering a problem with payment later on as the assigned customer ID for a guest checkout is always 0 and I am getting an error messages from the payment database saying the customer entry already exists (I am using the stripe payment extension)

If i register an account the customer id is assigned as an increasing number for each account and everything works.

I assume the error I see and the fact that the customer ID is always 0 are linked but am not sure - is there a way to assign a unique customer ID for each guest checkout or should I try to modify the payment app to not rely on customer id as the primary key in the database?

Any insights would be really appreciated, thank you!

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 6143
  • Karma: +284/-2
    • View Profile
Re: Guest checkout - Assigned Customer ID is always 0
« Reply #1 on: July 27, 2017, 01:15:51 AM »
Hello.

"Unknown error encountered. Please try again" usually mean incorrect security token passed with form. What is your AbanteCart version? If it is 1.2.10 upgraded from 1.2.9 you need to make sure all files are upgraded correctly. Latest AbanteCart source here https://github.com/abantecart/abantecart-src/releases

For the Stripe issue. What version if stripe you have? I mean free version in core or paid from marketplace?

Offline Philipp82

  • Newbie
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
Re: Guest checkout - Assigned Customer ID is always 0
« Reply #2 on: July 27, 2017, 02:35:32 AM »
Thank you,

Yes I am using 1.2.10 updated from 1.2.9, so I will go and check if anything has not updated correctly, thanks for pointing me in this direction.

Can I ask: Should the "Guest Checkout" customer_id always be 0? -Or does this indicate that there is something wrong with my Abantecart installation?

Just to make sure I am not trying to fix the wrong part - if customer_Id should always be 0 when checking out as a guest I guess I need to go dig in the payment extension.
(It is the paid stripe extension - I have already contacted the developer)

Offline Philipp82

  • Newbie
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
Re: Guest checkout - Assigned Customer ID is always 0
« Reply #3 on: July 27, 2017, 09:56:34 AM »
Thanks again for the help - I have done some more work on this and found that the two problems are unrelated.

The error message I receive needed a line of code updated as described here: newbielink:http://forum.abantecart.com/index.php/topic,5664.msg24484.html#msg24484 [nonactive]

The fact that the payment extension struggles with guest checkout customer_id being 0 still needs to be resolved but is an issue for the extension provider. I managed to temporarily avoid the problem by simply not writing to the database in question if customer_id is 0 - that lets people check out just fine as the database is not crucial for payment.

Thanks again for the help!

 

Powered by SMFPacks Social Login Mod