Shopping cart help

Discussion in 'PHP' started by leony, Aug 6, 2008.

  1. #1
    Hi,

    I have managed to built my shopping cart and I can see all the products, quantities, pricing ,totals, shipping costs so forth.

    However, what is the best way to email this cart to the customer? Basically when a customer hits a button (email me etc) he will go to a page where he needs to enter basic info (email, address, etc) and and there will be a button at the end of the form (email me!)

    But how can I pass all the values in the cart to this new page? (I store all the cart information in mysql database EXCEPT the delivery cost and totals).

    Would you say create an SQL query and get everthing again? (But how about shipping value and totals?)

    I hope I am making sense.
     
    leony, Aug 6, 2008 IP
  2. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #2
    Well if you have given each order its own unique id... just make a call to the database on submission and use the return values to fill out the email.
     
    shallowink, Aug 6, 2008 IP
  3. php-lover

    php-lover Active Member

    Messages:
    261
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    58
    #3
    You should use session variable to hold your customer shopping, and when all your site process done with the session variable then save to database.
     
    php-lover, Aug 6, 2008 IP