Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / All Other Contributions/Addons / Anyone know how to add field for Mailchimp to sidebox?

Anyone know how to add field for Mailchimp to sidebox?

Locked

Started by daneh on 11 Sep 2008, 1:03 AM · Views: 5,226

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
11 Sep 2008, 1:03 AM
#1
daneh avatar

daneh

Zen Follower

Join Date:
Dec 2007
Location:
Southern Maine
Posts:
268
Plugin Contributions:
0

Anyone know how to add field for Mailchimp to sidebox?

Add a field to my newsletter sidebox? I am using mailchimp, and would like to add a field or two to my sidebox. I know very little about coding, but was able to get a few radio buttons to show up, but they had weird text with them. I would like the buttons to be yes and no buttons.

Could someone tell me which files I would need to modify to get the following:

The words BYG Member above the buttons
the words yes and no beside the corresponding button

and lastly, how do I get the buttons to actually work so the choice gets sent to mailchimp? I know I need to create a table for the input from the new buttons at mailchimp, and have done it.

I have been fiddling by copying/pasting then taking a look at what I changed, but at one point I got a blank page, so I stopped...:D

I basically need a little push in the right direction.....ok, fine. A hard shove.

16 Sep 2009, 3:40 PM
#2
lextechs avatar

lextechs

Zen Follower

Join Date:
Mar 2005
Location:
Tempe, AZ
Posts:
316
Plugin Contributions:
0

Re: Anyone know how to add field for Mailchimp to sidebox?

daneh:

Add a field to my newsletter sidebox? I am using mailchimp, and would like to add a field or two to my sidebox. I know very little about coding, but was able to get a few radio buttons to show up, but they had weird text with them. I would like the buttons to be yes and no buttons.

Could someone tell me which files I would need to modify to get the following:

The words BYG Member above the buttons
the words yes and no beside the corresponding button

and lastly, how do I get the buttons to actually work so the choice gets sent to mailchimp? I know I need to create a table for the input from the new buttons at mailchimp, and have done it.

I have been fiddling by copying/pasting then taking a look at what I changed, but at one point I got a blank page, so I stopped...:D

I basically need a little push in the right direction.....ok, fine. A hard shove.

The file you mod is \includes\templates\Custom\sideboxes\tpl_mailchimp_sidebox.php

Around line 11
$content .= ENTRY_EMAIL_ADDRESS;
$content .= '<input type="text" name="EMAIL" value=""><br />';
$content .= ENTRY_FIRST_NAME;
$content .= '<input type="text" name="FNAME" value=""><br />';
$content .= ENTRY_LAST_NAME;
$content .= '<input type="text" name="LNAME" value=""><br />';

You can see here i added customer first and last name.

If i am right to get the radio buttons to work copy
$content .= '<input type="radio" name="EMAILTYPE" value="html" checked>' . ENTRY_EMAIL_HTML_DISPLAY . '   <input type="radio" name="EMAILTYPE" value="text">' . ENTRY_EMAIL_TEXT_DISPLAY;

Edit name EMAILTYPE to INTERESTS value="YES" checked

You would have to create a define in your launges/english file that would be for example . ENTRY_INTERESTS_YES_DISPLAY and ENTRY_INTERESTS_NO_DISPLAY

So if i am correct your new code would look like this:

$content .= '<input type="radio" name="INTERESTS" value="Yes" checked>' . ENTRY_INTERESTS_YES_DISPLAY . '   <input type="radio" name="INTERESTS" value="No">' . ENTRY_INTERESTS_NO_DISPLAY;

In the English file it would be

define('ENTRY_INTERESTS_YES_DISPLAY','Yes');
define('ENTRY_INTERESTS_NO_DISPLAY','No')
I hope this help test it out.

Lextechs.com Powered By ZenCart