2 Replies - 423 Views - Last Post: 06 October 2014 - 05:22 AM

#1 tirengarfio   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 08-December 08

What is the better "place" to store the added products to the

Posted 06 October 2014 - 03:13 AM

what is the better "place" to store the products already bought of a shopping cart, inside a session server variable or in a javascript client variable?
Is This A Good Question/Topic? 0
  • +

Replies To: What is the better "place" to store the added products to the

#2 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4208
  • View blog
  • Posts: 13,283
  • Joined: 08-June 10

Re: What is the better "place" to store the added products to the

Posted 06 October 2014 - 04:27 AM

definitely in a session. if the user unintentionally leaves the page, session data are still there while JS data are gone.

you might even consider storing them in a DB since that enables the user to access his cart at any time from anywhere.
Was This Post Helpful? 0
  • +
  • -

#3 astonecipher   User is offline

  • Senior Systems Engineer
  • member icon

Reputation: 2556
  • View blog
  • Posts: 10,269
  • Joined: 03-December 12

Re: What is the better "place" to store the added products to the

Posted 06 October 2014 - 05:22 AM

Already bought as in purchased or still in their cart? I agree with above for still in the cart. I look at sites on several machines and my phone, it is annoying to have a cart full of things or even a single hard searched item only to loose it when I change devices to pay.

If it is a previous order, a database is what you want.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1