Handling Guest Users On eCommerce Site

Options
Hi All, 

I am currently building the backend of an eCommerce marketplace using Xano. I need to implement the ability for guests to add items to a cart and proceed to payment without the need to create an account. I was wondering what the best practice for this would be. 

I was thinking of creating a temp user in the user table which would link to other important tables (cart/transactions/etc.). There would be some implications around when to create this user record, how to handle user records that don't proceed to payments, and saving guest information.

I would appreciate any advice anyone may have on best practice. 

Comments

  • Kevin Wasie
    Kevin Wasie Member
    Options
    Depending on complexity… and idea…  in user table have Boolean value of has_logon_access. 

    Use the user table still to record all necessary data on guest user. Just dont setup logon access.

    This works if you’re still collecting an email address and using email as unique field on table.

    Then you’re fulfillment tables can utilize same user table data instead of managing temp table and conditions. 

    This also requires terms and conditions indicate that you are saving user data. 
  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
    You could also store information about the shopping cart in persistent localStorage on the browser. That way there's no need to tie it to anything on the back-end. Localstorage would survive across page refereshes but not across devices, which is about the behavior you get in other ecommerce sites.