Forum Replies Created
-
AuthorPosts
-
September 7, 2018 at 7:00 pm in reply to: How to get buyer's name and email address to be used in PHP code #78378
ec999
MemberThank you! I will find another solution to what I want to accomplish. I will not bother you any more with my questions.
September 6, 2018 at 7:18 pm in reply to: How to get buyer's name and email address to be used in PHP code #78376ec999
MemberUsing implode to transform the arrays to a string as shown below does not make any difference. The result is still ***. The arrays seem to be empty.
add_action( ‘eStore_product_database_updated_after_payment’, ‘my_custom_code’, $ipn_data, $cart_items );
function my_custom_code ($ipn_data, $cart_items) {
//The $ipn_data, $cart_items arrays contain all the useful data.
//Do something with it.
$message = implode(“*”,$ipn_data) . ” *** ” . implode(“*”,$cart_items);
$message = wordwrap($message, 70, “rn”, TRUE);
$message = str_replace(“n.”, “n..”, $message);
$header = “from:sender@email”;
$subject = “sales data”;
$to = “receiver@email”;
$mail_sent = @mail($to,$subject,$message,$header);
}
September 5, 2018 at 10:55 am in reply to: How to get buyer's name and email address to be used in PHP code #78374ec999
MemberI wonder if you have seen my previous post? Can you help me? Thanks
August 31, 2018 at 7:12 pm in reply to: How to get buyer's name and email address to be used in PHP code #78373ec999
MemberTo get the information of the sale I tried to send the information via email to my self using the following code:
add_action( ‘eStore_product_database_updated_after_payment’, ‘my_custom_code’, $ipn_data, $cart_items );
function my_custom_code ($ipn_data, $cart_items) {
//The $ipn_data, $cart_items arrays contain all the useful data.
//Do something with it.
$message = $ipn_data . ” *** ” . $cart_items;
$message = wordwrap($message, 70, “rn”, TRUE);
$message = str_replace(“n.”, “n..”, $message);
$header = “from:sender@email”;
$subject = “sales data”;
$to = “receiver@email”;
$mail_sent = @mail($to,$subject,$message,$header);
}
However the mail produced only the following: ***
i.e. $ipn_data and $cart_items seemed to be empty variables. Can you explain that? Thanks in advance for your response.
P.S. I have inserted my PDT Identity Token in the PayPal settings.
August 24, 2018 at 8:07 pm in reply to: How to get buyer's name and email address to be used in PHP code #78372ec999
MemberYes, I think you are right. A custom plugin using the action hook you provided in your first reply would be the best. I will go for that solution. Thank you.
August 22, 2018 at 4:33 pm in reply to: How to get buyer's name and email address to be used in PHP code #78370ec999
MemberThanks for your response.
I just found “3rd party integration” in the settings section.
If this is activated then eStore will post the IPN(instant payment notification) to the URL specified. I think that would be a good solution for me.
Could the information that I need then be obtained by using the code you provided in your first response? Or is another approach needed?
Thanks.
August 20, 2018 at 8:14 pm in reply to: How to get buyer's name and email address to be used in PHP code #78368ec999
MemberThank you for your response. I think that is just what I need to be able to do what I want.
However, since I have no experience in going into the code of wordpress plugins, I would be happy if you could give me slightly more details – especially in regard to where I should place the above code supplemented with my own extra code.
I do have some experience in PHP coding, but my computer programs are made using PowerBasic for Windows.
Thanks again. So far my experience with eStore has been great. Really a fine plugin!
-
AuthorPosts