close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Send Email Order to multiple buyers.

Thread began 1/02/2013 4:25 pm by eric284736 | Last modified 2/05/2013 12:15 pm by eric284736 | 1964 views | 18 replies |

eric284736

Send Email Order to multiple buyers.

Hi Jason,

I have a site that basically allows members to sell items. A shopper can purchase items from multiple people at one time and checkout once.

I need to have the order receipt go to each seller. I have a foreign key setup in the cart columns that could link to the seller's account.

My question is how do I pull that email address on the confirm page? This of course would need to happen after the PayPal transaction is approved.

thx
Eric

Sign in to reply to this post

Jason ByrnesWebAssist

You will need some hand coding to accomplish this.

you need to loop through the cart contents to return the IDs of the items purchased, convert the list of ID's to a comma separated list. For example:

php:
<?php

while (!$eCart1->EOF())      {
    
$cartItemsArr[] = $eCart1->DisplayInfo("ID");
  
$eCart1->MoveNext();
}
$eCart1->MoveFirst();
$cartItems implode(", "$cartItemsArr);
?>



then use $cartItems in a recordset to return the email addresses that relate to the Ids


for example:

SELECT * FROM table WHERE ID IN($cartItems)

you c an use that recordset in the receipt mail.

if you need help accomplishing this, we can help in a premiere support appointment.

Sign in to reply to this post

eric284736

Thanks Jason! I will give it a try first.

Should the snippet of code go before the Universal Email code block?

thx
Eric

Sign in to reply to this post

Jason ByrnesWebAssist

that snippet of code will need to be before the recordset and before the UE code block.

it is only an example though, and will need to be modified depending on your cart object name.

Sign in to reply to this post

eric284736

Thanks Jason!!

Sign in to reply to this post

eric284736

Jason,

I have not tested this yet by making a purchase, but I wanted to run this by you.

I have the code in place:
<?php
while (!$eCart1->EOF()) {
$cartItemsArr[] = $eCart1->DisplayInfo("cartClosetID");
$eCart1->MoveNext();
}
$eCart1->MoveFirst();
$cartItems = implode(", ", $cartItemsArr);
?>

The cart object is the default eCart1.

For the recordset I have:

mysql_select_db($database_connBLUR, $connBLUR);
$query_rsItemsCart = "SELECT * FROM closet WHERE closetID IN($cartItems)";
$rsItemsCart = mysql_query($query_rsItemsCart, $connBLUR) or die(mysql_error());
$row_rsItemsCart = mysql_fetch_assoc($rsItemsCart);
$totalRows_rsItemsCart = mysql_num_rows($rsItemsCart);

Does thi slook correct?

thx
Eric

Sign in to reply to this post

Jason ByrnesWebAssist

yes, that looks correct

Sign in to reply to this post

eric284736

Hi Jason,

I did a test and I did not get any errors, but the email did not come thru for the sellers. I did get an order confirmation to the buyer.

Is there code I can add to the page to see what is taking place?

If we need to do this as a premier support session then go ahead and set that up please.

thx
Eric

Sign in to reply to this post

Jason ByrnesWebAssist

If you add the following code to the payment success page, it will show all the session contents, this will include information about each email it tried to send and the status:

php:
<?php @session_startvar_dump($_SESSION); ?>



if you want us to look into it in a premiere support incident, you will need to visit the support landing page to sign up for a premiere support session.

Sign in to reply to this post

eric284736

Hi Jason,

I did a support ticket with Ray and he got the setup and working.
Now PayPal has an issue with the client using Pro/Direct Payment so we have to go to PayPal Standard.

With PayPal Standard can we still accomplish this?
I would just need to move that code to the new confirm page, correct?

thx
Eric

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...