PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Email Notification of Specific Post Page Sales

s2Member Plugin. A Membership plugin for WordPress®.

Email Notification of Specific Post Page Sales

Postby klawncare1239 » October 21st, 2011, 9:54 am

I have to imagine that this answer can be found elsewhere, but I'll be darned if I can find it.

I see that there is an option to enter Specific Post/Page ~ Sale Notification URLs, and then below that an option for:
Send An Email Transaction Log Of This Event?

What I would like to know is, if I enter an email address there, what information would be sent to that address and in what circumstance?

Does it send an email anytime there is a specific post/page purchase? Does it send all information sent back by PayPal IPN or a subset of that?

The reason I ask is because I want to setup some specific post/page purchase options which would result in a PHYSICAL product sale. I read earlier about how to require shipping information to be entered for the purchase, and then simply having the "thank you" page be the protected page for that sale.

That sounds great. However, I have a fulfillment company that does all my shipping and it would be nice to have those sales forwarded directly to them. What I DON'T want, though, is for ALL purchases of any specific post/page to go to them because some of them are not physical products to be shipped. Some really are just for access to whatever content is on that page.

How do I accomplish my goal?
User avatar
klawncare1239
Registered User
Registered User
 
Posts: 18
Joined: April 18, 2011

Re: Email Notification of Specific Post Page Sales

Postby Jason Caldwell » October 22nd, 2011, 5:44 pm

Thanks for your inquiry.

Does it send an email anytime there is a specific post/page purchase? Does it send all information sent back by PayPal IPN or a subset of that?
Yes, it sends an email each time a Specific Post/Page is purchased. The email will contain a subset of information returned by PayPal, along with other details provided by s2Member. Basically, you'll get ALL of the information that you see available in the Replacement Codes for URL Notifications:
SNAG-0052.png

That sounds great. However, I have a fulfillment company that does all my shipping and it would be nice to have those sales forwarded directly to them. What I DON'T want, though, is for ALL purchases of any specific post/page to go to them because some of them are not physical products to be shipped. Some really are just for access to whatever content is on that page.

How do I accomplish my goal?

It sounds like you need to forward details to this company conditionally. So instead of a basic email notification from s2Member, you will need to prepare a PHP script to receive a URL-based Notification from s2Member instead. This PHP script that you'll write, will receive the details provided by s2Member, and then make a decision about whether to send it to your fulfillment company or not.

Or, another option is to use an action Hook, which would be processed during s2Member's Specific Post/Page sale processing routine. This is much more advanced, but one benefit is that you'd have access to an even larger data set, and all of the IPN data received by s2Member. But again, this is advanced, and would most likely require assistance from a developer to get everything working the way you need it to.

Create this directory and file:
/wp-content/mu-plugins/my-s2-sp-access-handler.php
Code: Select all
<?php
add_action 
("ws_plugin__s2member_during_paypal_notify_during_sp_access", "my_s2_sp_access_handler");
function my_s2_sp_access_handler ($vars = array ())
    {
        $paypal = $vars["paypal"];
    // This variable `$paypal` contains ALL data provided by PayPal via IPN communication.

    // print_r($vars); # Gives you a full list of details provided by s2Member during testing.
    }
?>
* See also: viewforum.php?f=40#src_doc_overview_description
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Email Notification of Specific Post Page Sales

Postby klawncare1239 » October 23rd, 2011, 9:44 am

Thank you for your reply, Jason. Looks like I will probably just setup a PHP script myself or possibly just setup a "filter" on my email account that will forward the email to my shipping agent only if it contains a certain phrase (the product name for instance). Maybe that would be the easiest method. Any reason this would not be a good idea?
User avatar
klawncare1239
Registered User
Registered User
 
Posts: 18
Joined: April 18, 2011

Re: Email Notification of Specific Post Page Sales

Postby Jason Caldwell » October 23rd, 2011, 11:01 am

That sounds like it would work just fine :-)
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron