Jump to content
Latest News: (loading..)
ecommunlimited

Mailchimp newsletter Everywhere add on

Recommended Posts

You must to adjust the html page of the module to your website.


Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

Tuto for 2.4 :
- How to Display a new page with app
- How to make Header Tags under app APP
- How to make a
boostrap modal with external element

Share this post


Link to post
Share on other sites

You must to update the html content in function your needs

In includes/modules/content/footer/template

 

you find this : maybe not updated for BS

<div class="clearfix"></div>
<div class="ContentText footer_mailchimp">
  <div class="row col-md-12">
    <div class="col-md-3"></div>
    <div class="col-md-2"><h4><?php echo MODULE_FOOTER_MAILCHIMP_TEXT; ?></h4></div>
    <div class="col-md-3">
<?php
  echo $form;
  if (!empty(MODULES_HEADER_TAGS_MAILCHIMP_LIST_CUSTOMERS)) {
    echo tep_draw_input_field('lastname', NULL, 'class="form-control" required aria-required="true" required="" id="lname" placeholder="' . ENTRY_LAST_NAME . '"');
    echo tep_draw_input_field('firstname', NULL, 'class="form-control" required aria-required="true" required="" id="fname" placeholder="' . ENTRY_FIRST_NAME . '"');
    echo tep_draw_input_field('email', NULL, 'required  id="email" placeholder="' . ENTRY_EMAIL_ADDRESS . '"', 'email');
    echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, null, null, 'success','id="SendButton','xs')
  } elseif (!empty(MODULES_HEADER_TAGS_MAILCHIMP_LIST_ANONYMOUS)) {
    echo tep_draw_input_field('email', NULL, 'required  id="email" placeholder="' . ENTRY_EMAIL_ADDRESS . '"', 'email');
    echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, null, null, 'success','id="SendButton','xs')  . tep_draw_hidden_field('anonymous', 'anonymous');
  }
  echo $endform;
?>
    </div>
    <div><span class="message" id="message"><span></div>
  </div>
</div>

try this :

<div class="clearfix"></div>
  <div class="ContentText footer_mailchimp">
    <div><h4><?php echo MODULE_FOOTER_MAILCHIMP_TEXT; ?></h4></div>
<?php
  echo $form;
  if (!empty(MODULES_HEADER_TAGS_MAILCHIMP_LIST_CUSTOMERS)) {
    echo tep_draw_input_field('lastname', NULL, 'class="form-control" required aria-required="true" required="" id="lname" placeholder="' . ENTRY_LAST_NAME . '"') . ' ';
    echo tep_draw_input_field('firstname', NULL, 'class="form-control" required aria-required="true" required="" id="fname" placeholder="' . ENTRY_FIRST_NAME . '"'). ' ';
    echo tep_draw_input_field('email', NULL, 'required  id="email" placeholder="' . ENTRY_EMAIL_ADDRESS . '"', 'email'). ' ';
    echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, null, null, 'success','id="SendButton','xs'). ' ';
  } elseif (!empty(MODULES_HEADER_TAGS_MAILCHIMP_LIST_ANONYMOUS)) {
    echo tep_draw_input_field('email', NULL, 'required  id="email" placeholder="' . ENTRY_EMAIL_ADDRESS . '"', 'email'). ' ';
    echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, null, null, 'success','id="SendButton','xs')  . tep_draw_hidden_field('anonymous', 'anonymous');
  }
  echo $endform;
?>
  <div><span class="message" id="message"><span></div>
  </div>
</div>

Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

Tuto for 2.4 :
- How to Display a new page with app
- How to make Header Tags under app APP
- How to make a
boostrap modal with external element

Share this post


Link to post
Share on other sites

you have a problem with this :

<script data-rocketsrc="ext/api/mailchimp_v3/mailchimp_v3.js" type="text/rocketscript"> </script>

and must to be

<script src="ext/api/mailchimp_v3/mailchimp_v3.j"> </script>

please activate the debug, I can see the result


Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

Tuto for 2.4 :
- How to Display a new page with app
- How to make Header Tags under app APP
- How to make a
boostrap modal with external element

Share this post


Link to post
Share on other sites

@@Gyakutsuki

 

I use the CDN CloudFlare. They have a speed optimization function called Rocket Loader. It converts all scripts like <script src="ext/api/mailchimp_v3/mailchimp_v3.j"> </script>  to  <script data-rocketsrc="ext/api/mailchimp_v3/mailchimp_v3.js" type="text/rocketscript"> </script>. It has never messed with any other scripts besides this one.

 

This block of code from cm_footer_mailchimp.php has a comma after 'MODULE_FOOTER_MAILCHIMP_SORT_ORDER',

 

    function keys() {
      return array('MODULE_FOOTER_MAILCHIMP_STATUS',
                   'MODULE_FOOTER_MAILCHIMP_LAST_NAME',
                   'MODULE_FOOTER_MAILCHIMP_FIRST_NAME',
                   'MODULE_FOOTER_MAILCHIMP_SORT_ORDER',
                  );

 

This block of code from ht_mailchimp.php does not.

 

    function keys() {
      return array('MODULES_HEADER_TAGS_MAILCHIMP_STATUS',
                   'MODULES_HEADER_TAGS_MAILCHIMP_API',
                   'MODULES_HEADER_TAGS_MAILCHIMP_LIST_ANONYMOUS',
                   'MODULES_HEADER_TAGS_MAILCHIMP_LIST_CUSTOMERS',
                   'MODULES_HEADER_TAGS_MAILCHIMP_STATUS_CHOICE',
                   'MODULES_HEADER_TAGS_MAILCHIMP_DEBUG',
                   'MODULES_HEADER_TAGS_MAILCHIMP_SORT_ORDER'
                  );

 

Which would be correct?

 

Also, I can't seem to find where to change the size of the newsletter sign up. It seems to be at 100%.

 

Take care

Bill

Share this post


Link to post
Share on other sites

you can use the second,

It seems to be at 100% yes add a col-sm-xx (xx is a number between  and 12)

for exemple :

<div class="col-sm-8 ContentText footer_mailchimp">
Edited by Gyakutsuki

Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

Tuto for 2.4 :
- How to Display a new page with app
- How to make Header Tags under app APP
- How to make a
boostrap modal with external element

Share this post


Link to post
Share on other sites

@@Gyakutsuki

 

Sorry if I'm being a pain but I still can't get the mod to subscribe. Here's the errors.log.

[07-Dec-2016 19:30:07 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 451[07-Dec-2016 19:30:07 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 454[07-Dec-2016 19:30:07 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 455[07-Dec-2016 19:30:07 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 458[07-Dec-2016 19:30:07 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 468[07-Dec-2016 19:30:07 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 476[07-Dec-2016 19:30:07 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 495

Here are those lines.

 

 // TABLES: address_format
451.  function tep_address_format($address_format_id, $address, $html, $boln, $eoln) {
    $address_format_query = tep_db_query("select address_format as format from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . (int)$address_format_id . "'");
    $address_format = tep_db_fetch_array($address_format_query);
454.
455.  $company = tep_output_string_protected($address['company']);
    if (isset($address['firstname']) && tep_not_null($address['firstname'])) {
      $firstname = tep_output_string_protected($address['firstname']);
458.  $lastname = tep_output_string_protected($address['lastname']);
    } elseif (isset($address['name']) && tep_not_null($address['name'])) {
      $firstname = tep_output_string_protected($address['name']);
      $lastname = '';
    } else {
      $firstname = '';
      $lastname = '';
    }
    $street = tep_output_string_protected($address['street_address']);

    $suburb = tep_output_string_protected($address['suburb']);
468.  $city = tep_output_string_protected($address['city']);
    $state = tep_output_string_protected($address['state']);
    if (isset($address['country_id']) && tep_not_null($address['country_id'])) {
      $country = tep_get_country_name($address['country_id']);

      if (isset($address['zone_id']) && tep_not_null($address['zone_id'])) {
        $state = tep_get_zone_code($address['country_id'], $address['zone_id'], $state);
      }
476.   } elseif (isset($address['country']) && tep_not_null($address['country'])) {
      $country = tep_output_string_protected($address['country']['title']);
    } else {
      $country = '';
    }
    $postcode = tep_output_string_protected($address['postcode']);
    $zip = $postcode;

    if ($html) {
// HTML Mode
      $HR = '<hr />';
      $hr = '<hr />';
      if ( ($boln == '') && ($eoln == "\n") ) { // Values not specified, use rational defaults
        $CR = '<br />';
        $cr = '<br />';
        $eoln = $cr;
      } else { // Use values supplied
        $CR = $eoln . $boln;
        $cr = $CR;
495.  }
    } else {
// Text Mode

Share this post


Link to post
Share on other sites

sorry don't understand, no relation


Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

Tuto for 2.4 :
- How to Display a new page with app
- How to make Header Tags under app APP
- How to make a
boostrap modal with external element

Share this post


Link to post
Share on other sites

hello,

 

Mailchimp based on api v3.

 

Some people ask to create a topic about this contribution

The v 1.8 change a little bit, disable the contribution and copy the files and enable !

Tk to @@raiwa for this comment.

 

link to the addon : http://addons.oscommerce.com/info/9289

Edited by Gyakutsuki

Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

Tuto for 2.4 :
- How to Display a new page with app
- How to make Header Tags under app APP
- How to make a
boostrap modal with external element

Share this post


Link to post
Share on other sites

Try le latest (1.8) but this is a simple add on and I haven't compatibility problem.


Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

Tuto for 2.4 :
- How to Display a new page with app
- How to make Header Tags under app APP
- How to make a
boostrap modal with external element

Share this post


Link to post
Share on other sites

@@Gyakutsuki,

 

There are stille several bugs in the footer template

 

it throws "Illegal string offset 'type'" errors., the buttons are wrong coded:

    echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, null, null, 'success','id="SendButton','xs');

should be:

echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, null, null, null, null, 'btn-success btn-xs')

I believe you do not need id's neither in the input field.

 

In the last input field line 14 aria-required="true" was missing:

    echo tep_draw_input_field('email', NULL, 'required aria-required="true" id="email" placeholder="' . ENTRY_EMAIL_ADDRESS . '"', 'email') . ' ';

The name fields do not show because of a upper/lower case error in "true". In the first condition:

  if (!empty(MODULES_HEADER_TAGS_MAILCHIMP_LIST_CUSTOMERS) && (MODULE_FOOTER_MAILCHIMP_DISPLAY_NAME == 'True')) {

"True" must be in upper case like defined in the header tag module. It was in lower case.

 

Other footer modules use <h2> for the title, why <h4>?

 

It should be:

<div class="footerbox mailchimp">

instead of:

  <div class="footer_mailchimp">

Do you test your modules before uploading? It's easy to make mistakes, I make too, but so many?

 

Why using hardcoded "col-md-12" in all divs, other footer modules have a configurable width:

<div class="col-sm-<?php echo $content_width; ?>">

You could just use the "account" footer module as an example how it is done.

 

rgds

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

Oups, bad born !!! Change, Tk Rainer


Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

Tuto for 2.4 :
- How to Display a new page with app
- How to make Header Tags under app APP
- How to make a
boostrap modal with external element

Share this post


Link to post
Share on other sites

yes, you must see subscribe success message, do you see in mailchimp your subscription

Enable the debug and go to the console to see the message.

Edited by Gyakutsuki

Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

Tuto for 2.4 :
- How to Display a new page with app
- How to make Header Tags under app APP
- How to make a
boostrap modal with external element

Share this post


Link to post
Share on other sites

@@raiwa

 

Your fixes helped me with my footer and stopped the warnings in my errors.log!!!

 

@@Gyakutsuki

 

It is still not submitting / subscribing when I test it. I'm using my API key and have tried two different List Numbers. One for the Weekly Newsletter and one for the Monthly Newsletter.

I have set up the two newsletters but I have not created them yet. Do I have to create them for this to work?

 

Where in the console will it show so I can see the subscribe success message? Can you make it show in the admin?

Share this post


Link to post
Share on other sites

@@raiwa

 

I have now. This: ''id="SendButton", is in the public_html/includes/modules/content/footer/templates/footer_mailchimp.php file. It blows out my footer and template_bottom.

 

In the same file this: echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, null, null, null, 'btn-success btn-xs'); needs to be above this: } elseif (!empty(MODULES_HEADER_TAGS_MAILCHIMP_LIST_ANONYMOUS)) { or the subscribe button doesn't show.

 

Now I can get this far: Adding your email address... and it stops. The persons name and email stay in the box instead of removing it after hitting the subscribe button. It doesn't show I have a new subscriber either.

 

Take care

Bill

Share this post


Link to post
Share on other sites

@@raiwa

 

And now these are back. It only does this when I hit the subscribe button.

 

[08-Dec-2016 17:43:43 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 451
[08-Dec-2016 17:43:43 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 454
[08-Dec-2016 17:43:43 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 455
[08-Dec-2016 17:43:43 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 458
[08-Dec-2016 17:43:43 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 468
[08-Dec-2016 17:43:43 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 476
[08-Dec-2016 17:43:43 America/Detroit] PHP Warning:  Illegal string offset 'type' in /home/ecommu5/public_html/includes/functions/html_output.php on line 495

Edited by ecommunlimited

Share this post


Link to post
Share on other sites

@@raiwa

@ecommunlimited

 

I saw an a bug when you are in anonymous mode, I downloaded an update.

I think now it's ok.

 

http://addons.oscommerce.com/info/9289

 

In your console mode, (mode debuf), you must to see this result. if you see his element, it' ok otherwise, you will have an error.

 

note : don't try lot of time with the same email, because, after 3-5 times your email is blocked par mailchimp.

array(19) {
  ["id"]=>
  string(32) "******"
  ["email_address"]=>
  string(21) "*******"
  ["unique_email_id"]=>
  string(10) "**********"
  ["email_type"]=>
  string(4) "html"
  ["status"]=>
  string(10) "subscribed"
  ["merge_fields"]=>
  array(2) {
    ["FNAME"]=>
    string(0) ""
    ["LNAME"]=>
    string(0) ""
  }
  ["stats"]=>
  array(2) {
    ["avg_open_rate"]=>
    int(0)
    ["avg_click_rate"]=>
    int(0)
  }
  ["ip_signup"]=>
  string(0) ""
  ["timestamp_signup"]=>
  string(0) ""
  ["ip_opt"]=>
  string(12) "***IP********"
  ["timestamp_opt"]=>
  string(25) "2016-12-08T22:44:21+00:00"
  ["member_rating"]=>
  int(2)
  ["last_changed"]=>
  string(25) "2016-12-08T22:44:21+00:00"
  ["language"]=>
  string(0) ""
  ["vip"]=>
  bool(false)
  ["email_client"]=>
  string(0) ""
  ["location"]=>
  array(6) {
    ["latitude"]=>
    int(0)
    ["longitude"]=>
    int(0)
    ["gmtoff"]=>
    int(0)
    ["dstoff"]=>
    int(0)
    ["country_code"]=>
    string(0) ""
    ["timezone"]=>
    string(0) ""
  }
  ["list_id"]=>
  string(10) "***********"
  ["_links"]=>
  array(8) {
    [0]=>
    array(4) {
      ["rel"]=>
      string(4) "self"
      ["href"]=>
      string(92) "https://us10.api.mailchimp.com/3.0/lists/89af30fc9f/members/*********"
      ["method"]=>
      string(3) "GET"
      ["targetSchema"]=>
      string(81) "https://us10.api.mailchimp.com/schema/3.0/Definitions/Lists/Members/Response.json"
    }
    [1]=>
    array(5) {
      ["rel"]=>
      string(6) "parent"
      ["href"]=>
      string(59) "https://us10.api.mailchimp.com/3.0/lists//*********"/members"
      ["method"]=>
      string(3) "GET"
      ["targetSchema"]=>
      string(91) "https://us10.api.mailchimp.com/schema/3.0/Definitions/Lists/Members/CollectionResponse.json"
      ["schema"]=>
      string(76) "https://us10.api.mailchimp.com/schema/3.0/CollectionLinks/Lists/Members.json"
    }
    [2]=>
    array(5) {
      ["rel"]=>
      string(6) "update"
      ["href"]=>
      string(92) "https://us10.api.mailchimp.com/3.0/lists/89af30fc9f/members//*********"
      ["method"]=>
      string(5) "PATCH"
      ["targetSchema"]=>
      string(81) "https://us10.api.mailchimp.com/schema/3.0/Definitions/Lists/Members/Response.json"
      ["schema"]=>
      string(78) "https://us10.api.mailchimp.com/schema/3.0/Definitions/Lists/Members/PATCH.json"
    }
    [3]=>
    array(5) {
      ["rel"]=>
      string(6) "upsert"
      ["href"]=>
      string(92) "https://us10.api.mailchimp.com/3.0/lists/*********/members/*********"
      ["method"]=>
      string(3) "PUT"
      ["targetSchema"]=>
      string(81) "https://us10.api.mailchimp.com/schema/3.0/Definitions/Lists/Members/Response.json"
      ["schema"]=>
      string(76) "https://us10.api.mailchimp.com/schema/3.0/Definitions/Lists/Members/PUT.json"
    }
    [4]=>
    array(3) {
      ["rel"]=>
      string(6) "delete"
      ["href"]=>
      string(92) "https://us10.api.mailchimp.com/3.0/lists/89af30fc9f/members/*********"
      ["method"]=>
      string(6) "DELETE"
    }
    [5]=>
    array(4) {
      ["rel"]=>
      string(8) "activity"
      ["href"]=>
      string(101) "https://us10.api.mailchimp.com/3.0/lists/*********/members/*********/activity"
      ["method"]=>
      string(3) "GET"
      ["targetSchema"]=>
      string(90) "https://us10.api.mailchimp.com/schema/3.0/Definitions/Lists/Members/Activity/Response.json"
    }
    [6]=>
    array(4) {
      ["rel"]=>
      string(5) "goals"
      ["href"]=>
      string(98) "https://us10.api.mailchimp.com/3.0/lists/*********/members/*********/goals"
      ["method"]=>
      string(3) "GET"
      ["targetSchema"]=>
      string(87) "https://us10.api.mailchimp.com/schema/3.0/Definitions/Lists/Members/Goals/Response.json"
    }
    [7]=>
    array(4) {
      ["rel"]=>
      string(5) "notes"
      ["href"]=>
      string(98) "https://us10.api.mailchimp.com/3.0/lists/*********/members/*********/notes"
      ["method"]=>
      string(3) "GET"
      ["targetSchema"]=>
      string(97) "https://us10.api.mailchimp.com/schema/3.0/Definitions/Lists/Members/Notes/CollectionResponse.json"
    }
  }
}

Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

Tuto for 2.4 :
- How to Display a new page with app
- How to make Header Tags under app APP
- How to make a
boostrap modal with external element

Share this post


Link to post
Share on other sites

Since yesterday there's been six updates to this package and none of then work. I've tried them everyone of them. I'm giving up on this mod. Thanks for trying to help fellas, I appreciate all the effort that's been put into this.

 

Take care

Bill

Share this post


Link to post
Share on other sites

@ecommunlimited

 

I understand your frustration, but it's a development with some test and update.

Also, I understand your knowledge are basic, but some people are like you since Oscommerce exist and some people acquire knowledge because Osc is simple to understand and work to understand.

C'est en forgeant que l'on devient forgeron :)

That's why the community is make to share and help.

 

The latest must be the good ( I hope) :).


Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

Tuto for 2.4 :
- How to Display a new page with app
- How to make Header Tags under app APP
- How to make a
boostrap modal with external element

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×