Integrating with Tips and Tricks eStore WordPress Plugin

Highlighted
Regular Visitor

Integrating with Tips and Tricks eStore WordPress Plugin

HI! I'd like to add all buyers on my website to my Constant Contact list. My shopping cart uses Tips & Trick HQ's eStore plugin, which is set up to integrate with 3 mailing list services, but not Constant Contact. The developers of the plugin though have provided these instructions for integrating with other services:

 

There is a file called "eStore_auto_responder_handler.php" in the WP eStore plugin which handles the autoresponder subscriptions. After a sale or when the squeeze form is submitted the following two functions in this file will get called:

1. eStore_item_specific_autoresponder_signup
2. eStore_global_autoresponder_signup

The 1st one handles the signup of individual list subscription on a per product basis (for example you have 3 items in the cart and they need to be subscribed to 3 different lists).

The 2nd one handles the global signup to one list/campaign if you have set this option in the autoresponder settings menu.

All the required values (e.g. first name, last name, email) are passed to this functions.

You simply have to add in the integration code for your own autoresponder in the above two functions so it can signup the customer.

 

I want to use the 2nd one and add all buyers to one list. This is the function:

 

function eStore_global_autoresponder_signup($firstname,$lastname,$emailaddress)
{
	global $wp_eStore_config;
	$wp_eStore_config = WP_eStore_Config::getInstance();
		
	eStore_payment_debug('Performing global autoresponder signup if specified.',true);
	if (get_option('eStore_enable_aweber_int') == 1)
    {
    	$download_email = get_option('eStore_download_email_address');
    	$aweber_list = get_option('eStore_aweber_list_name');
        $cust_name = $firstname .' '. $lastname;
        eStore_send_aweber_mail($aweber_list,$download_email,$cust_name,$emailaddress);
        eStore_payment_debug('AWeber list to signup to:'.$aweber_list,true);
        eStore_payment_debug('AWeber list signup from email address value:'.$download_email,true);
        eStore_payment_debug('AWeber global list signup email sent for customer:'.$emailaddress,true);
    }
    if (get_option('eStore_enable_global_chimp_int') == 1)
    {
    	eStore_payment_debug('Mailchimp integration is being used.',true);	 
        $api = eStore_get_chimp_api_new();
        $target_list_name = get_option('eStore_chimp_list_name');
        $retval = eStore_mailchimp_subscribe($api,$target_list_name,$firstname,$lastname,$emailaddress);
        eStore_payment_debug('MailChimp list to signup to:'.$target_list_name,true);
        eStore_payment_debug('MailChimp global list signup operation performed. Return value is: '.$retval,true);
    }
    if(get_option('eStore_enable_global_getResponse_int') == 1)
    {
    	eStore_payment_debug('GetResponse integration is being used.',true);	 
	    $campaign_name = get_option('eStore_getResponse_campaign_name');
	    $retval = eStore_getResponse_subscribe($campaign_name,$firstname,$lastname,$emailaddress);
	    eStore_payment_debug('GetResponse campaign to signup to:'.$campaign_name,true);
	    eStore_payment_debug('GetResponse global list signup operation performed. Return value is: '.$retval,true);	      	
    }
    if (get_option('eStore_enable_infusionsoft_int') == 1)
    {
         $groupId = get_option('eStore_infusionsoft_group_number');
         $result = eStore_infusionsoft_signup($firstname, $lastname, $emailaddress, $groupId);
         eStore_payment_debug('Infusionsoft signup result: '.$result,true);
    } 	
    if($wp_eStore_config->getValue('eStore_use_global_generic_autoresponder_integration')=='1')
    {
    	 eStore_payment_debug('Generic global autoresponder integration is being used.',true);	
         $list_email_address = $wp_eStore_config->getValue('eStore_generic_autoresponder_target_list_email');
         $result = eStore_generic_autoresponder_signup($firstname, $lastname, $emailaddress, $list_email_address);
         eStore_payment_debug('Generic autoresponder signup result: '.$result,true);
    } 

	// API call for plugins extending the global autoresponder signup
	$signup_data = Array('firstname'=>$firstname, 'lastname'=>$lastname, 'email'=>$emailaddress);
	do_action('eStore_global_autoresponder_signup',$signup_data);    
}

 

I've had a look at the PHP code sample wrapper but I'm a bit unsure of how to pull this all together. I know enough PHP to get myself into trouble, but not out of it!!

 

So any guidance on how to make this work will be greatly appreciated.

 

Cheers!


1 REPLY 1
Highlighted
Moderator

Re: Integrating with Tips and Tricks eStore WordPress Plugin

Hey,

 

What you're looking for is definitely possible, but the amount of information needed to build this app would not be something that we can provide. We support our developers, but we don't create the integrations ourselves.

 

I would definitely suggest reaching out to eStore about creating an integration with us. If they would be interested in moving forward with an integration, they can contact our AppConnect team about how we can work with them. We also have a network of developers on our Marketplace that are available for these types of projects, and are used to working with our API.

Nick Galbraith
Support Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured