Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

How do i Add Newsletter Signup Box in my Footer ?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-24-2013, 02:03 AM
 
liamb2001 liamb2001 is offline
 

eXpert
  
Join Date: May 2006
Posts: 216
 

Default How do i Add Newsletter Signup Box in my Footer ?

Im looking to add a simple Input Box and Go button in the footer of my page for Signing up for Newsletter, could someone tell me how i could do this please ?

Ive looked into common_files/modules/News_Managment/Register_newslists.tpl and cannot figure out how to import a simple box into my main footer
__________________
X-Cart Version 4.55
Reply With Quote
  #2  
Old 07-24-2013, 04:46 AM
 
philrisk philrisk is offline
 

X-Adept
  
Join Date: Jul 2009
Location: Newcastle upon Tyne, UK
Posts: 412
 

Default Re: How do i Add Newsletter Signup Box in my Footer ?

This is the code I use on a static page.

PHP Code:
<form action="news.php" name="subscribeform" method="post">
<
input type="hidden" name="subscribe_lng" value="{$store_language|escape}/>
<
label for="semail">{$lng.lbl_your_email}</label><br>
* <
input type="text" class="input-email" id="semail" name="newsemail" size="30" value="{$newsemail|default:""|escape}/><br><br>
{include 
file="customer/buttons/subscribe_menu.tpl" type="input" assign="submit_button"}
{if 
$active_modules.Image_Verification and $show_antibot.on_news_panel eq 'Y'}
{include 
file="modules/Image_Verification/spambot_arrest.tpl" mode="data-table" id=$antibot_sections.on_news_panel button_code=$submit_button}
{else}
{
$submit_button}
{/if}
</
form
__________________
Live with Gold 4.5.1
Dedicated Linux server
MaxCDN 4 pull zones
Dedicated SSL

Reply With Quote

The following user thanks philrisk for this useful post:
carpeperdiem (10-12-2013)
  #3  
Old 08-19-2013, 08:03 AM
 
liamb2001 liamb2001 is offline
 

eXpert
  
Join Date: May 2006
Posts: 216
 

Default Re: How do i Add Newsletter Signup Box in my Footer ?

Just applied that and its near perfect mate thankss...only one little problem im having is. Im trying to remove the spambot so its just a basic input box for the newsletter it hink ive done it with the following

<form action="news.php" name="subscribeform" method="post">
<input type="hidden" name="subscribe_lng" value="{$store_language|escape}" />
<label for="semail">Signup for Newsletter: </label>
<input type="text" class="input-email" id="semail" name="newsemail" size="30" value="{$newsemail|default:""|escape}" /><br><br>
{include file="customer/buttons/subscribe_menu.tpl" type="input" assign="submit_button"}

Problem is when i enter an email address it just refreshes the page

Im not sure its working, is there anyway of getting to give a message stating the customer has successfully signed up for the email or is my code wrong ?

Also is there a place in the admin i can see these submitted newsletter emails ? ive found the news management but its not in there ?
__________________
X-Cart Version 4.55
Reply With Quote
  #4  
Old 08-19-2013, 11:17 PM
 
philrisk philrisk is offline
 

X-Adept
  
Join Date: Jul 2009
Location: Newcastle upon Tyne, UK
Posts: 412
 

Default Re: How do i Add Newsletter Signup Box in my Footer ?

Your missing a closing </form> for a start. Add that and see what happens. It should take you to a subscribed page.
__________________
Live with Gold 4.5.1
Dedicated Linux server
MaxCDN 4 pull zones
Dedicated SSL

Reply With Quote
  #5  
Old 08-19-2013, 11:52 PM
 
liamb2001 liamb2001 is offline
 

eXpert
  
Join Date: May 2006
Posts: 216
 

Default Re: How do i Add Newsletter Signup Box in my Footer ?

sorry i did have the form closed but didnt paste it in

this is what i have now

<form action="news.php" name="subscribeform" method="post">
<input type="hidden" name="subscribe_lng" value="{$store_language|escape}" />
<input type="text" class="input-email" id="semail" name="newsemail" size="30" value="{$newsemail|default:""|escape}" /><br><br>
{include file="customer/buttons/subscribe_menu.tpl" type="input" assign="submit_button"}

</form>

but im getting the charchters you typed in do not match the picture

how do i use your code with just leaving the newsletter input box alone without the spambot or image verification ?
__________________
X-Cart Version 4.55
Reply With Quote
  #6  
Old 10-12-2013, 07:51 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: How do i Add Newsletter Signup Box in my Footer ?

Quote:
Originally Posted by philrisk
This is the code I use on a static page.

Instead of making new thread, I'm gonna tack-on to this one... PTI

Phil, thanks for the dedicated form code. MY goal here is to make a static page that is hidden by robots.txt, and used as "subscribe" form for a 3rd party API that will "post" to the form. FROM THERE, the AWeber email API will take the info from the xcart database and send to AWeber email.

WHY the extra step?
AWeber will not permit a 3rd party to access their API.
But they will permit transfer of data from my xcart database to theirs. We just have to get the data into xcart (from facebook). The OfferPop API permits a "post" to xcart news form.

SO... I used the form as suggested in #2 and it's great. I removed the captcha. Works perfectly (after turning on the news module).

NOW -- I'd like to add a FirstName and LastName field to newsletter.

[why xcart default does not have a fullname or first/last fields optional is beyond me! personalized marketing email is proven to be FAR more effective than anonymous]

Any ideas how to do this?
Yes, I guess I would add two fields to the table: xcart_newslist_subscription

Then I guess it's gonna be an edit to
/modules/News_Management/news_manage.php

But that's just a bit over my head to do this from scratch.

It's probably 2 lines of code, right?

HAS ANYONE added first name and last name to the newsletter input form? How?

Thanks!
J
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #7  
Old 10-12-2013, 08:38 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: How do i Add Newsletter Signup Box in my Footer ?

Quote:
Originally Posted by carpeperdiem
NOW -- I'd like to add a FirstName and LastName field to newsletter.
Answered in the other thread: http://forum.x-cart.com/showthread.php?t=67935
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:15 PM.

   

 
X-Cart forums © 2001-2020