[FX.php List] Shopping Carts - Keep in SessionVars or Add Recordsright away?

Leo R. Lundgren leo at finalresort.org
Wed Jul 29 13:58:58 MDT 2009


There is definately a time difference. Unless I misunderstood what you  
mean by session variables.

If you just write thirty variables to the $_SESSION array, there only  
overhead involved is the one when PHP seralizes the values into the  
session storage, which by default is files under /tmp on the  
webserver. But this is isn't noticable for low-traffic hosts.

On the other hand, if you are to write your values to a table in  
FileMaker, you have all the usual overhead involved with communicating  
with said database.


29 jul 2009 kl. 20.45 skrev Bob Patin:

> Here's a question for GGT (or anyone else who may know this): is  
> there any speed difference at all between writing 30 or so session  
> variables versus writing 30 or so fields to 1 or more tables?
>
> For the sake of argument, let's say you're writing to two tables-- 
> first is the temp order table, 2nd is the lineitems table.
>
> Is the difference in time involved negligible?
>
> Best,
>
> Bob Patin
>
>
> <new_logo_idea3_120w.jpg>
>
>
>
> Longterm Solutions
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> iChat: bobpatin
> FileMaker 10 Certified Developer
> Member of FileMaker Business Alliance and FileMaker TechNet
> --------------------------
> FileMaker hosting and consulting for all versions of FileMaker
> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>
> On Jul 29, 2009, at 12:43 PM, Joel Shapiro wrote:
>
>> Don't know how long this thread may keep going, but let me put in  
>> my "Thanks Everybody" here & now:
>>
>> Thanks Everybody
>>
>> Best,
>> -Joel
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~
>> Joel Shapiro
>> FileMaker Pro
>> database & web design
>> http://www.jsfmp.com
>> 415-269-5055
>> ~~~~~~~~~~~~~~~~~~~~~~~
>>
>>
>> On Jul 29, 2009, at 9:43 AM, VanBuskirk, Patricia wrote:
>>
>>> As a frequent online shopper, I like this idea.  I had over $100 of
>>> merch in my cart at Khols online, accumulated throughout the day,  
>>> and I
>>> went away from my pc for a couple of hours to come back to an empty
>>> cart.  I did not try to re-shop, so they lost the business.
>>>
>>>
>>> -----Original Message-----
>>> From: fx.php_list-bounces at mail.iviking.org
>>> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Dale  
>>> Bengston
>>> Sent: Wednesday, July 29, 2009 12:37 PM
>>> To: FX.php Discussion List
>>> Subject: Re: [FX.php List] Shopping Carts - Keep in SessionVars or  
>>> Add
>>> Recordsright away?
>>>
>>> I agree that this is a client business rule, but there is very  
>>> little
>>> penalty for saving records to a table, and keeping them as a status
>>> that is suppressed by the client-server UI. I am doing this for an
>>> order site. In my opinion, saving records also makes it easier to
>>> retrieve a shopping cart if the user quits and relaunches, or in
>>> another typical, natural way destroys their session.
>>>
>>> Dale
>>>
>>>
>>>
>>> --
>>> Dale Bengston
>>> Streamline Studio, LLC
>>> www.streamline-studio.com
>>>
>>> On Jul 29, 2009, at 10:46 AM, Bob Patin wrote:
>>>
>>>> For one client it was a half-hour; this wasn't a cart per se, but a
>>>> registration site. The issue for the client was to make sure that
>>>> everyone who completed the process was definitely sent an email
>>>> confirmation; eventually the other programmer in this project (I  
>>>> was
>>>> a sub-contractor on this) decided to write a script, and trigger it
>>>> every 60 seconds. It looks for abandoned registrations, and if it's
>>>> been more than a half-hour, deletes the temp record. If not, it
>>>> confirms that there's a credit card payment auth code and if so, it
>>>> sends the confirmation email.
>>>>
>>>> I don't use scripts much at all in web apps, but this was what the
>>>> other consultant wanted, and it does work pretty well with  
>>>> scheduled
>>>> script-triggering from Server 10.
>>>>
>>>> For this app we use a temp table, but for a smaller app on the same
>>>> site, where people are signing up for meetings, I store everything
>>>> in session variables until the end because there's not much to keep
>>>> track of...
>>>>
>>>> BP
>>>>
>>>> Bob Patin
>>>> Longterm Solutions LLC
>>>> bob at longtermsolutions.com
>>>> 615-333-6858
>>>> http://www.longtermsolutions.com
>>>> Twitter: bobpatin
>>>> iChat/AIM: bobpatin
>>>> FileMaker 10 Certified Developer
>>>> Member of FileMaker Business Alliance & TechNet
>>>> --------------------------
>>>> FileMaker hosting and consulting for all versions of FileMaker
>>>> PHP * jQuery * ExpressionEngine
>>>> Full email services * Free DNS hosting * Colocation * Consulting
>>>>
>>>>
>>>> On Jul 29, 2009, at 3:49 AM, Gjermund Gusland Thorsen wrote:
>>>>
>>>>> What are your criterias for deleting the carts not owned by  
>>>>> anybody?
>>>>>
>>>>> ggt
>>>>>
>>>>> 2009/7/29 Head Honcho <headhoncho at customikesolutions.com>:
>>>>>> Hi Joel,
>>>>>>
>>>>>> I record them immediately, and run a script weekly to "delete"  
>>>>>> non
>>>>>> purchased
>>>>>> orders.
>>>>>>
>>>>>> It also helps in the reporting to see what people have started
>>>>>> ordering and
>>>>>> then dropped out, so to speak.
>>>>>>
>>>>>> As Webko said, this also allows for "pausing" an order and
>>>>>> resuming it
>>>>>> later.
>>>>>>
>>>>>> HTH.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Michael Ward
>>>>>> --
>>>>>> Head Honcho
>>>>>> CustoMike Solutions
>>>>>> Member, FileMaker Business Alliance
>>>>>> Member, FileMaker Technical Network
>>>>>> FileMaker 7 Certified Developer
>>>>>> FileMaker 8 Certified Developer
>>>>>> FileMaker 9 Certified Developer
>>>>>> FileMaker 10 Certified Developer
>>>>>> 10 Wandoo Crt
>>>>>> Wheelers Hill, 3150
>>>>>> ph 0414 562 501
>>>>>> headhoncho at customikesolutions.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 29/07/2009, at 9:24 AM, Joel Shapiro wrote:
>>>>>>
>>>>>>> Thanks Leo
>>>>>>>
>>>>>>> That's what I'd been thinking.
>>>>>>>
>>>>>>> It's good to see what different people are doing...
>>>>>>>
>>>>>>> -Joel
>>>>>>>
>>>>>>>
>>>>>>> On Jul 28, 2009, at 4:18 PM, Leo R. Lundgren wrote:
>>>>>>>
>>>>>>>> Yeah there's really a question of what features you want.
>>>>>>>>
>>>>>>>> The basic approach is to keep the cart in the session as  
>>>>>>>> session
>>>>>>>> variables. There's really no need to put it all in the  
>>>>>>>> database,
>>>>>>>> use the
>>>>>>>> session for what it's worth instead :)
>>>>>>>>
>>>>>>>> BUT, keeping the cart inside the DB will allow for certain
>>>>>>>> things, such
>>>>>>>> as the client can put some stuff in the cart, mail his  
>>>>>>>> collegue,
>>>>>>>> and tell
>>>>>>>> him "hey, look at the stuff I put in our cart", and the  
>>>>>>>> collegue
>>>>>>>> can do so
>>>>>>>> from a totally different computer. They can collaborate.
>>>>>>>>
>>>>>>>> If that latter example isn't needed, I'd store it in the  
>>>>>>>> session.
>>>>>>>>
>>>>>>>>
>>>>>>>> 29 jul 2009 kl. 01.14 skrev Tim 'Webko' Booth:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 29/07/2009, at 9:11 AM, Joel Shapiro wrote:
>>>>>>>>>
>>>>>>>>>> Hi all
>>>>>>>>>>
>>>>>>>>>> Anybody have any thoughts on *when* in shopping cart
>>>>>>>>>> functionality it's
>>>>>>>>>> best to add items as records to the database?
>>>>>>>>>>
>>>>>>>>>> My initial thinking is that it would make more sense to just
>>>>>>>>>> keep items
>>>>>>>>>> in Session Variable arrays and only add anything to the
>>>>>>>>>> database at the time
>>>>>>>>>> of Checkout -- to keep the DB from bulking up with  
>>>>>>>>>> unpurchased
>>>>>>>>>> items left in
>>>>>>>>>> the cart.  But searching online, it seems that carts often  
>>>>>>>>>> add
>>>>>>>>>> records to
>>>>>>>>>> the database as soon as they go into the cart.  (Might that  
>>>>>>>>>> be
>>>>>>>>>> different
>>>>>>>>>> when using MySQL as opposed to FMP?)
>>>>>>>>>>
>>>>>>>>>> FWIW - Users on this site will average 1-4 items per order.
>>>>>>>>>
>>>>>>>>> I tend to add them immediately - allows me to also re-show
>>>>>>>>> previous not
>>>>>>>>> actually purchased items on request further down the track...
>>>>>>>>>
>>>>>>>>> Cheers
>>>>>>>>>
>>>>>>>>> Webko
>>>>>>>>> _______________________________________________
>>>>>>>>> FX.php_List mailing list
>>>>>>>>> FX.php_List at mail.iviking.org
>>>>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>>>>>
>>>>>>>>
>>>>>>>> -|
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> FX.php_List mailing list
>>>>>>>> FX.php_List at mail.iviking.org
>>>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> FX.php_List mailing list
>>>>>>> FX.php_List at mail.iviking.org
>>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> FX.php_List mailing list
>>>>>> FX.php_List at mail.iviking.org
>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>>>
>>>>> _______________________________________________
>>>>> FX.php_List mailing list
>>>>> FX.php_List at mail.iviking.org
>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>
>>>> _______________________________________________
>>>> FX.php_List mailing list
>>>> FX.php_List at mail.iviking.org
>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>
>>>
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list


-|



More information about the FX.php_List mailing list