• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

how to get guest user id before register

Bug Report
3
19
769
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    mindwebtree @Amitk-Webkul last edited by mindwebtree 28 Jun 2023, 14:36 28 Jun 2023, 13:48

    @Amitk-Webkul
    so how to possible add to cart item for guest user ?

    1 Reply Last reply Reply Quote 0
    • A
      Amitk-Webkul last edited by 29 Jun 2023, 04:53

      Hi @mindwebtree,

      We are saving cart items on the basis of Email ID.

      M 1 Reply Last reply 29 Jun 2023, 05:32 Reply Quote 0
      • M
        mindwebtree @Amitk-Webkul last edited by mindwebtree 29 Jun 2023, 05:36 29 Jun 2023, 05:32

        @Amitk-Webkul
        when first time guest user add to cart item so which email using without order placed

        may i know ?

        1 Reply Last reply Reply Quote 0
        • A
          Amitk-Webkul last edited by 29 Jun 2023, 06:01

          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.

          M 2 Replies Last reply 30 Jun 2023, 06:00 Reply Quote 0
          • M
            mindwebtree @Amitk-Webkul last edited by mindwebtree 29 Jun 2023, 15:06 29 Jun 2023, 14:58

            @Amitk-Webkul
            if i want to add my custom functionality for guest user before add to cart and order place so which column basis possible

            what is role of token that token insert cart item table

            1 Reply Last reply Reply Quote 0
            • M
              mindwebtree @Amitk-Webkul last edited by 30 Jun 2023, 06:00

              @Amitk-Webkul
              please give me any response

              1 Reply Last reply Reply Quote 0
              • A
                Amitk-Webkul last edited by 30 Jun 2023, 06:04

                Hi @mindwebtree,

                You can add custom functionality based on session.

                Here token is a CSRF token to protect the website.

                M 2 Replies Last reply 30 Jun 2023, 06:33 Reply Quote 0
                • M
                  mindwebtree @Amitk-Webkul last edited by mindwebtree 30 Jun 2023, 06:32 30 Jun 2023, 06:11

                  @Amitk-Webkul
                  how to work add to cart for guest user because that time not any specific value like email id , id etc.

                  1 Reply Last reply Reply Quote 0
                  • M
                    mindwebtree @Amitk-Webkul last edited by 30 Jun 2023, 06:33

                    @Amitk-Webkul
                    please sir let me know

                    1 Reply Last reply Reply Quote 0
                    • A
                      Amitk-Webkul last edited by Amitk-Webkul 30 Jun 2023, 06:52 30 Jun 2023, 06:48

                      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.

                      M 1 Reply Last reply 30 Jun 2023, 07:03 Reply Quote 0
                      • M
                        mindwebtree @Amitk-Webkul last edited by mindwebtree 30 Jun 2023, 07:06 30 Jun 2023, 07:03

                        @Amitk-Webkulba.png

                        when click add to cart then item add in cart it how to possible before place order

                        1 Reply Last reply Reply Quote 0
                        • devansh-webkul
                          devansh-webkul last edited by 30 Jun 2023, 07:09

                          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.

                          M 1 Reply Last reply 30 Jun 2023, 07:13 Reply Quote 0
                          • M
                            mindwebtree @devansh-webkul last edited by 30 Jun 2023, 07:13

                            @devansh-webkul
                            Is add to cart functionality working according to session if yes so how please tell me

                            1 Reply Last reply Reply Quote 0
                            • devansh-webkul
                              devansh-webkul last edited by 30 Jun 2023, 07:16

                              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

                              M 1 Reply Last reply 1 Jul 2023, 11:22 Reply Quote 0
                              • M
                                mindwebtree @devansh-webkul last edited by 1 Jul 2023, 11:22

                                @devansh-webkul
                                hello are you there ?

                                M 1 Reply Last reply 1 Jul 2023, 11:23 Reply Quote 0
                                • M
                                  mindwebtree @mindwebtree last edited by 1 Jul 2023, 11:23

                                  @mindwebtree
                                  what is different between customer and guest user ?
                                  please describe me

                                  1 Reply Last reply Reply Quote 0
                                  • A
                                    Amitk-Webkul last edited by 6 Jul 2023, 05:09

                                    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.

                                    1 Reply Last reply Reply Quote 0
                                    12 out of 19
                                    • First post
                                      12/19
                                      Last post