Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6577681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:40:08+00:00 2026-05-25T15:40:08+00:00

I want to create an e-commerce project online. I have this issue : if

  • 0

I want to create an e-commerce project online. I have this issue :

  • if the user is not logged in, then the selected products will be automatically added to a default cart under the name of guest001, guest002 etc where guestxxx is a default user.

  • if the user signs up, then the system will automatically check in his carts data to add it to his new account

  • when the user then wants to add new products to cart, they will be added directly to his cart.

My questions are :

  • Should I be using cookies to store the data in the user’s machine, so it will be used by the system once the user creates his account? or should I use server side session data?

  • Should I be creating a default client (guestxxx) in the database once the unknown user adds something to his cart, or just create a cookie to store the data without the need to create a guest user?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:40:09+00:00Added an answer on May 25, 2026 at 3:40 pm

    I just have little suggestion for you.
    If you are using Codeigniter Framework you can use Library Cart Class
    or you want make code yourself.

    According to my experience. I was used session for store cart while users checkout I add his cart into my database.
    Disadvantage of using it while browser is closed your guest cart will start from default (no cart),

    If you use cookie for it while browser is closed your guest cart will keep exist. ( store in browser ). But I think you can use both of it. Use cookie for keep cart data and use session for processing cart in your PHP Code. because Cookie is stored in browser, malicious user can do malicious activity of it.

    For client i think you can use session or cookie rather than add his data into database
    Hope it can help you. I just know little about it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a wordpress website, and I want to create a simple web commerce.
I want create subdomains like this: domain.com/type/city An examples: domain.com/restaurants/new_york domain.com/hotels/new_york domain.com/restaurants/chicago I have
i want create image animation , i have 50 images with png format now
I'm creating magazine style theme (not e-commerce) and I want to display 3 latest
I want create a pdf using iText. The method which does this is a
I want to create a blog for an e-commerce website, but due to data
I have an ASP.NET 3.5 e-commerce site that has an admin section. I want
I want create constructor that will take one or more integers and save it
I have a problem about to create a website. This is the first time,
I'm trying to create a gift wrapping module for Drupal commerce. I have created

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.