Bluehost.com Web Hosting $6.95

RE: [PHP] Delimiter WITHOUT lots of IF's

This is a discussion on RE: [PHP] Delimiter WITHOUT lots of IF's within the PHP General forums, part of the PHP Programming Forums category; Using a cookie (I know, I know...) I plant a cookie in the visitor's browser when he opens the ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-19-2003
Cesar Aracena
 
Posts: n/a
Default RE: [PHP] Delimiter WITHOUT lots of IF's

Using a cookie (I know, I know...) I plant a cookie in the visitor's
browser when he opens the site with a random generated number which
expires when the browser(s) is closed. With that SID, PHP stores the
orders (one per line) into a "sessions" table in MySQL each with the
itemID. Is it fine or am I too messy?

TXS,

Cesar Aracena

>
> How are you keeping track of items added being added to the shopping
> cart?
>
> -----Original Message-----
> From: Cesar Aracena [mailto:lists@icaam.com.ar]
> Sent: Monday, August 18, 2003 7:55 PM
> To: php-general@lists.php.net
> Subject: [php] Delimiter WITHOUT lots of IF's
> Importance: High
> Sensitivity: Confidential
>
> Hi all,
>
> I need to create an automatic process for visitors who are adding

items
> into a shopping cart, be able to see how many MBs and how many CDs

will
> the order have.
>
> >From this site, visitors will be able to choose one ore more software

> products from a list of hundreds. I want them to check the cart to see
> something like:
>
> Total size: 872,43 MBs
> Total CDs: 2
> Total price: $XXX,XX
>
> Now, I developed a decision function that works with a lot of IF
> statements, but I only calculated a max o 6 CDs (690,00 MBs max. per
> CD), but I want to be able to make this automatically... Can someone
> help me with this?
>
> BTW, Using PHP 4+ and MySQL 3+.
>
> Thanks in advanced,
>
> Cesar Aracena
> www.icaam.com.ar
>
> Note: The information inside this message and also in the attached

files
> might be confidential. If you are not the desired receptor or the

person
> responsible of delivering the message, we notify you that it's copy,
> distribution, keep or illegal use of the information it has it's
> prohibited. Therefore we ask you to notify the sender by replying this
> message immediately and then delete it from your computer.
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>




Reply With Quote
  #2 (permalink)  
Old 08-19-2003
Ralph Guzman
 
Posts: n/a
Default RE: [PHP] Delimiter WITHOUT lots of IF's

No, that sounds about right.

So your table should have the following fields:

customer_session_id, item_id, quantity, final_price

so then all you have to do is query this table looking for all items in
customers shopping cart.

I am not quite sure how you are going about calculating orders in
customer's basket. You said you wrote a function with multiple IF
statements, can you show me the code for this function so that I can get
a better idea of what you are currently doing?


-----Original Message-----
From: Cesar Aracena [mailto:lists@icaam.com.ar]
Sent: Monday, August 18, 2003 8:38 PM
To: 'Ralph Guzman'; php-general@lists.php.net
Subject: RE: [php] Delimiter WITHOUT lots of IF's
Importance: High
Sensitivity: Confidential

Using a cookie (I know, I know...) I plant a cookie in the visitor's
browser when he opens the site with a random generated number which
expires when the browser(s) is closed. With that SID, PHP stores the
orders (one per line) into a "sessions" table in MySQL each with the
itemID. Is it fine or am I too messy?

TXS,

Cesar Aracena

>
> How are you keeping track of items added being added to the shopping
> cart?
>
> -----Original Message-----
> From: Cesar Aracena [mailto:lists@icaam.com.ar]
> Sent: Monday, August 18, 2003 7:55 PM
> To: php-general@lists.php.net
> Subject: [php] Delimiter WITHOUT lots of IF's
> Importance: High
> Sensitivity: Confidential
>
> Hi all,
>
> I need to create an automatic process for visitors who are adding

items
> into a shopping cart, be able to see how many MBs and how many CDs

will
> the order have.
>
> >From this site, visitors will be able to choose one ore more software

> products from a list of hundreds. I want them to check the cart to see
> something like:
>
> Total size: 872,43 MBs
> Total CDs: 2
> Total price: $XXX,XX
>
> Now, I developed a decision function that works with a lot of IF
> statements, but I only calculated a max o 6 CDs (690,00 MBs max. per
> CD), but I want to be able to make this automatically... Can someone
> help me with this?
>
> BTW, Using PHP 4+ and MySQL 3+.
>
> Thanks in advanced,
>
> Cesar Aracena
> www.icaam.com.ar
>
> Note: The information inside this message and also in the attached

files
> might be confidential. If you are not the desired receptor or the

person
> responsible of delivering the message, we notify you that it's copy,
> distribution, keep or illegal use of the information it has it's
> prohibited. Therefore we ask you to notify the sender by replying this
> message immediately and then delete it from your computer.
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>






Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 01:55 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0