Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How To Add Dadamail Newsletter Subscription Box


Guest

Recommended Posts

Posted

Hello!

 

I have installed Dadamail as my newsletter software and I am now trying to add an infobox into my column_right which will allow customers to enter their email address and then when they click submit it adds them to the mailing list. In the Dadamail admin panel it says you can just add the following html code to any webpage...

 

 

<form action="http://www.punkrockcds.com/cgi-bin/dada/mail.cgi" method="get">
 <input type="hidden" name="list" value="punkrock" />
 <input type="hidden" name="f" value="subscribe" />
 <input type="text" name="email" value="email address" size="16" onfocus="this.value='';" />
 <input type="submit" value="Submit" />
 </form>



 <p style="font-size:10px;font-family:Verdana,Arial,sans-serif;">
  Mailing List Powered by 
<a href="http://mojo.skazat.com" target="_blank" style="font-size:10px;font-family:Verdana,Arial,sans-serif;">
  Dada Mail
 </a>
</p>

 

I guess I need to convert this code into something similar to that in the "search" infobox which looks like this...

 

<!-- search //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_SEARCH);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'),
						   'align' => 'center',
						   'text' => tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH, 'align="absmiddle"') . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>');

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- search_eof //-->

 

Any help would be greatly appreciated.

 

Cheers,

Mark.

Posted

Hello!

 

Ok so I think I'm getting there! I've got the subscription field working where you can enter your email address but the infobox isn't quite right. Please can someone take a look at it in the right column of my site (www.punkrockcds.com) and advise where the code is wrong. Here is the code...

 

<!-- newsletter //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_NEWSLETTER);

 new infoBoxHeading($info_box_contents, false, false);

echo "<form action=\"http://www.punkrockcds.com/cgi-bin/dada/mail.cgi\" method=\"get\">\n"; 
echo "  <input type=\"hidden\" name=\"list\" value=\"punkrock\" />\n"; 
echo "  <input type=\"hidden\" name=\"f\" value=\"subscribe\" />\n"; 
echo "  <input type=\"text\" name=\"email\" value=\"email address\" size=\"16\" onfocus=\"this.value='';\" />\n"; 
echo "  <input type=\"submit\" value=\"Submit\" />\n"; 
echo "  </form>\n";


 new infoBox($info_box_contents);
?>

		</td>
	  </tr>
<!-- newsletter_eof //-->

 

Any help would be greatly appreciated!

 

Cheers,

Mark.

Posted

The following should do the trick:

 

<!-- newsletter //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_NEWSLETTER);

 new infoBoxHeading($info_box_contents, false, false);
 $info_box_contents = array();
 $info_box_contents[] = array('form' => tep_draw_form('newsl&oumletter', tep_href_link('http://www.punkrockcds.com/cgi-bin/dada/mail.cgi', '', 'NONSSL', false), 'get'),
						   'align' => 'center',
						   'text' => tep_draw_hidden_field('list', 'punkrock').' '. tep_draw_hidden_field('f', 'subscribe') .' '. tep_draw_input_field('email', 'email address', 'size="16" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px" onfocus="this.value=\'\';"') . '<input type=\"submit\" value=\"Submit\" />');

 new infoBox($info_box_contents);
?>

		</td>
	  </tr>
<!-- newsletter_eof //-->

Posted

Hello Manfred,

 

Thanks very much for your help! Still not quite right though. Would you be able to take another look?(www.punkrockcds.com)?

 

Cheers,

Mark.

Posted

Hello Manfred,

 

It's ok I think I've fixed it! Thankyou so much for your help. Can't thank you enough!

 

Cheers,

Mark.

Posted

Didn't test the code, but I think you got an idea on how to do it. And as far as I can see, you got the part I've missed fixed by yourself. I hope it works now for you as you expect.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...