Tips and Tricks HQ Forum

Support Forum for Tips and Tricks HQ Products

Register or log in - lost password?

Search the Forum

Tips and Tricks HQ Forum » WP eStore Forum » WP eStore Tweaks

Improving Functionality of MailChimp / WP eStore integration (Amin)

(6 posts) (2 voices)
  • Started 1 year ago by brianfeister
  • Latest reply from amin007
  • Related Topics:
    1. I noticed there is MailChimp integration with eStore, how about WP-Affiliate?
    2. mailchimp integration problem
    3. Integration with Mailchimp
    4. mail chimp API update
    5. How to add date stamp to squeeze page to use MailChimp Autoresponder

Tags:

  • api
  • integration
  • mailchimp
  • Tweaks
  1. brianfeister
    Member

    Hi, I spoke with another support member (Ivy) and he told me to bring this to Amin's attention.

    I've been doing a metric ton of research on the MailChimp API and wrapping my mind around how to achieve a certain specific goal that my client is looking for.

    Basically, MailChimp allows AutoResponders that happen on the basis of list segmentation. My goal is to send a MailChimp campaign that is specific to the product that is purchased by the customer of the WP eStore. My initial plan was to embed a hidden 'form' field in the WP eStore plugin that would pass the data relating to item_name / item_id to MailChimp as a custom field. After discussing it with the MailChimp API support team they have told me that this is a limited approach because MailChimp only allows for up to 30 merge fields and if my product database grew too large then this option would not scale.

    So, I learned about the ecommAddOrder MailChimp API function http://www.mailchimp.com/api/1.2/ecommaddorder.func.php. This function is specifically for processing product / e-commerce related data to the MailChimp database.

    What I need to know is if you can show me where in the WP eStore plugin I can find the various functions that pass data to MailChimp via the API. We need to get in there and add a call to the ecommAddOrder function and insert the product name & id from WP eStore as the arrays 'items($product_id,$product_name)' so that this can be passed to the MailChimp list. Their MCAPI.class.php automatically integrates with MailChimp's eCommerce 360 which extends the functionality of MailChimp to do product-specific (and many other variables) list segmentation.

    So far I've found pieces of the relevant code in 'eStore_auto_responder_handler.php', 'paypal.php', 'eStore_post_payment_processing_helper.php',

    Also, why was this code commented out in the current version? Isn't a MailChimp API key required to make the API Calls?

    '
    <!--
    <tr valign="top"><td width="25%" align="left">
    MailChimp API Key:
    </td><td align="left">
    <input name="eStore_chimp_api_key" type="text" size="50" value="<?php echo get_option('eStore_chimp_api_key'); ?>"/>

    <i>The API Key of your MailChimp account (can be found under the "Account" tab). If you do not have the API Key then you can use the username and password option below.</i>

    </td></tr>

    <tr valign="top"><td width="25%" align="left">
    Or

    </td></tr>
    -->'

    Right now, the other MailChimp integration solutions are very limited, so if we can get this working it will add a VERY desirable functionality to the WP eStore plugin that should allow it to be listed as a "MailChimp Reccomended" plugin which I think would drive sales up!

    Let me know... Thanks!
    Brian

    Posted 1 year ago #
  2. amin007
    Key Master

    "why was this code commented out in the current version? Isn't a MailChimp API key required to make the API Calls?"

    You need a handle to the MailChimp API to make API calls. WP eStore gives two ways to do this... using the API Key or using the login details.

    I have commented out the API Key option as some customers with older version of PHP was having issues with this option and it was becoming a support nightmare for me.

    With that said, you will see the following line in "paypal.php" file:

    $api = eStore_get_chimp_api();

    The $api is your handle here.. just know that the "eStore_get_chimp_api" function will create this handle for you and you can start making api calls here.

    Posted 1 year ago #
  3. brianfeister
    Member

    Thanks so much Amin! Two things that I'm not clear on:

    1) Since the API credentials were deprecated does that mean that you found a way to make API calls without an API key or do I need to remove the comment out and enable the pieces of code that were commented out?

    2) What is the WP eStore specific function that returns the data for product_name. I think if I can get that from you the rest is on the MailChimp end as long as line 519 in 'paypal.php' is the only place I need to go in the WP eStore plugin to modify the MailChimp API call... is that right?

    Posted 1 year ago #
  4. brianfeister
    Member


    Posted 1 year ago #
  5. amin007
    Key Master

    "using the API Key or using the login details." - I meant you can uncomment the API part and use the API key path but at the moment eStore uses the "MailChimp" Login details to get hold of the API handle. This is why in the eStore's settings menu you had to enter your "MailChimp" login details not API Key.

    Modify around line 483 of "paypal.php" to add the product details to mailchimp. you can get the product name and id using the following:

    $item_number = $current_cart_item['item_number'];
    $item_name = $current_cart_item['item_name'];
    Posted 1 year ago #
  6. brianfeister
    Member

    Thanks so much... I think I just figured out the correct way to do this, the way that you intended the plugin to work :/

    Does the per-product auto-responder panel that is found under each item add them to a specific MailChimp list? Can I create a MailChimp list for each product and then do all of this without having to hack the back end of the code?

    Posted 1 year ago #
  7. amin007
    Key Master

    Yeah, if you want to sign up customers to different list on a per product basis then you need to specify the list name in the "Autoresponder" Section of the product and it will be accessible in the loop that I pointed to you earlier.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Tips and Tricks HQ Forum is proudly powered by bbPress

Tips and Tricks HQ  | WP Shopping Cart  | WP Affiliate Software  | WordPress Membership Plugin