how to get guest user id before register
-
@Amitk-Webkul
so how to possible add to cart item for guest user ? -
Hi @mindwebtree,
We are saving cart items on the basis of Email ID.
-
@Amitk-Webkul
when first time guest user add to cart item so which email using without order placedmay i know ?
-
HI @mindwebtree,
we are managing the Email ID while the order is placed.
For the first-time guest user, you can get the Cart ID on the basis of the session (session()->get('cart')->id).
From the Cart ID, you can get the cart item ID.
-
@Amitk-Webkul
if i want to add my custom functionality for guest user before add to cart and order place so which column basis possiblewhat is role of token that token insert cart item table
-
@Amitk-Webkul
please give me any response -
Hi @mindwebtree,
You can add custom functionality based on session.
Here token is a CSRF token to protect the website.
-
@Amitk-Webkul
how to work add to cart for guest user because that time not any specific value like email id , id etc. -
@Amitk-Webkul
please sir let me know -
Hi @mindwebtree,
before clicking on the final order place button, the complete data is saved, when the one-page checkout form has to be filled.
and then you will get the Email, id, etc data.
-
when click add to cart then item add in cart it how to possible before place order
-
Hi there,
Before proceeding with checkout, entry will be done in the cart. And I am not getting what you are trying to say. Can you please explain.
-
@devansh-webkul
Is add to cart functionality working according to session if yes so how please tell me -
Yes, guest functionality works according to the session and for customers, it is saved in the database.
For more info you can check this method here,
https://github.com/bagisto/bagisto/blob/0914f371f9f414697b1e4a57c22a2b271a9ec431/packages/Webkul/Checkout/src/Cart.php#L77 -
@devansh-webkul
hello are you there ? -
@mindwebtree
what is different between customer and guest user ?
please describe me -
Hi @mindwebtree,
The guest user allows a customer to purchase without logging into or creating a store account.
Customers are those that have an account on your store that they can log in to.