General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old April 25th, 2003, 11:56 AM
charlielha charlielha is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 10 charlielha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Confirmation Email with Items

Hi, I am working on a shopping cart with no checkout. Everything is working fine, the user has the ability to add products, update quantities and remove products. When he/she is done, he./she fill out a form and as soon as submit is pressed an email is generated. One goes to the order department and the other goes to the user. Now, what I need is to have the items the user picked in this emails.

Is there a way to store this using session variables? Or is there another way to do this?

Thanks

Reply With Quote
  #2  
Old April 25th, 2003, 12:16 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
Ok - how are you storing the items now? If it is in session var's, show us the array structure...
__________________
~ Joe Penn

We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set?

Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you.




Reply With Quote
  #3  
Old April 25th, 2003, 12:55 PM
charlielha charlielha is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 10 charlielha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Building A Persistent Shopping Cart With PHP and MySQL

I am using the Building A Persistent Shopping Cart With PHP and MySQL tutorial and modify it to fit my needs. The items are store in a table and identified by itemId and cookieId.

Reply With Quote
  #4  
Old April 25th, 2003, 01:32 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
PHP Code:
/************************
Get User Data
************************/
$query "SELECT * FROM the_table WHERE user_id_field = the_user_id";
$result mysql_query$query );
$i = ( int )0;
while( 
$res mysql_fetch_object$result ) )
{
        
$data[$i]['product'] = $res->prod_desc;
        
$data[$i]['quantity'] = $res->quantity;
        
$i++;


The above will get your data into a structured array. Then, you can iterate the array and build your email ->
PHP Code:
 $body 'Begin Order --------------------------';
foreach( 
$data as $prod )
{
        
$body .= 'Product: ' $prod['product'] . "\n\r";
        
$body .= 'Product: ' $prod['quantity'] . "\n\r\n\r\n\r";
}
$body .= 'End Of Order --------------------------'

Now, mail it ->
PHP Code:
function mail_it$to )
{
        foreach( 
$to as $address )
        {
                
/***************************
                Do your mail stuff here
                ***************************/
        
}
}
$to[] = /* First Address */
$to[] = /* Second Address */
mail_it$to ); 


Now, if you would have posted your code the above could have been taylored to what your needs - with no code, we can not provided you with cut and paste solutions. You are going to have to figure the above out on your own unless you post your code - thats why it is essential that code be posted when you guys ask questions...

Reply With Quote
  #5  
Old April 25th, 2003, 01:40 PM
charlielha charlielha is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 10 charlielha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks

Thanks, I don't have my files here but when I ged to work, I'll try out that code and in case I can't figure it out, I'll post my code.

Thanks for your help

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Confirmation Email with Items


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway