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

Static Page for newsletter subscription or unsubscription

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 03-07-2006, 04:24 PM
  connemara's Avatar 
connemara connemara is offline
 

Senior Member
  
Join Date: Jan 2006
Location: Vancouver Island, Canada
Posts: 167
 

Default Static Page for Newsletter subscribe-unsubscribe

Thank you for that suggestion. I can normally figure out a way to do the open window via javascript, just didn't know what/how to pull the results into it, so that was helpful!! Designer here, and not a programmer, so those code things will always challenge me.

I just installed and 'somewhat' customized my first xcart, and love the functionality it can have. Adding the cart to an existing site (a redo for SEO purposes) had it's own set of challenges- hence needing that open window thing for the newsletter signup off the cart.
And nice to see a "neighbour" on the list, too!
Connie Manning

xcart 4.17/specialoffers mod
__________________
Versions 4.7.6
multiple mods and customizations
Reply With Quote
  #12  
Old 03-12-2006, 08:42 AM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default

I modified the shopcart/skin1/news.tpl to this version below:

Code:
<TABLE> <FORM action="{$xcart_web_dir}/mail/subscribe.php" name="subscribeform"> <INPUT type="hidden" name="redirect" value="{$redirect}"> <TR> {if $usertype eq "C"} <TD class="VertMenuItems">To subscribe to the newsletter, enter your email address and click "Subscribe". {$lng.lbl_your_email} <FONT style="FONT-SIZE: 3px;"> </FONT><INPUT type="text" name="newsemail" size="16"> <FONT style="FONT-SIZE: 5px;"> </FONT><FONT class="FormButton">{$lng.lbl_subscribe}</FONT> <INPUT type="image" {include file="buttons/go_image.tpl" full_url='Y'}> Subscribing to our newsletter is free and your data will not be shared or sold with any other companies. Please see our privacy statement for details. </TD> {else} <TD> {$lng.lbl_your_email} <INPUT type="text" name="newsemail" size="16"> {include file="buttons/subscribe_menu.tpl"} </TD> {/if} </TD> </TR> </FORM> <FORM action="{$xcart_web_dir}/mail/unsubscribe.php" name="unsubscribeform"> <INPUT type="hidden" name="redirect" value="{$redirect}"> <TR> {if $usertype eq "C"} <TD class="VertMenuItems">To be removed from our newsletter subscription, type in your email address and then click "Unsubscribe". {$lng.lbl_your_email} <FONT style="FONT-SIZE: 3px;"> </FONT><INPUT type="text" name="email" size="16"> <FONT style="FONT-SIZE: 5px;"> </FONT><FONT class="FormButton">{$lng.lbl_unsubscribe}</FONT> <A href="javascript:document.unsubscribeform.submit()" class="VertMenuItems"> <INPUT type="image" {include file="buttons/go_image.tpl" full_url='Y'}></A></TD> {else} <TD> {$lng.lbl_your_email} <INPUT type="text" name="newsemail" size="16"> {include file="buttons/unsubscribe_menu.tpl"} </TD> {/if} </TD> </TR> </FORM> </TABLE>
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote
  #13  
Old 03-12-2006, 10:53 AM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default

Just to let you know that if this is on the main page to the left, no one can register as a new user !!!!!!!

You have to delete the unsubscribed section as the field it uses "email" is used for the register of an account.

So here is the version with unsubscribed deleted.

Code:
<TABLE> <FORM action="{$xcart_web_dir}/mail/subscribe.php" name="subscribeform"> <INPUT type="hidden" name="redirect" value="{$redirect}"> <TR> {if $usertype eq "C"} <TD class="VertMenuItems">To subscribe to the newsletter, enter your email address and click "Subscribe". {$lng.lbl_your_email} <FONT style="FONT-SIZE: 3px;"> </FONT><INPUT type="text" name="newsemail" size="16"> <FONT style="FONT-SIZE: 5px;"> </FONT><FONT class="FormButton">{$lng.lbl_subscribe}</FONT> <INPUT type="image" {include file="buttons/go_image.tpl" full_url='Y'}> Subscribing to our newsletter is free and your data will not be shared or sold with any other companies. Please see our privacy statement for details. </TD> {else} <TD> {$lng.lbl_your_email} <INPUT type="text" name="newsemail" size="16"> {include file="buttons/subscribe_menu.tpl"} </TD> {/if} </TD> </TR> </FORM> </TABLE>
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote
  #14  
Old 03-06-2007, 04:42 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Static Page for newsletter subscription or unsubscription

In case anyone is having trouble with the above code, here is an unsubscribe static page that works for 4.0.18:

Code:
<form action="mail/unsubscribe.php" method="post" name="unsubscribeform"> <table><tr><td><input type="text" name="email" size="40"></td><td>{include file="buttons/button.tpl" type="input" style="button" button_title="unsubscribe" href="javascript:document.unsubscribeform.submit()"}</td></tr></table> <input type=hidden name=redirect value="{$redirect}"> </form>
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #15  
Old 04-21-2007, 07:55 PM
  n00bert's Avatar 
n00bert n00bert is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 46
 

Default Re: Static Page for newsletter subscription or unsubscription

Hi,

I could be being dim, but in x-cart gold 4.1.6 there is no subscribe.php in /mail. I have only index.php and unsubscribe.php in /mail.

Since subscribe.php is being referenced from news.tpl, I cannot get this to work. I thought I might not have uploaded subscribe.php when I installed, so I checked my original 4.1.6 distribution. No subscribe.php in there either.

Does any one have any ideas as to where my subscribe.php file is?

thank you for your time and your help,

n00bert
__________________
Version 4.1.6 Gold

urban-kings.com
urbanwear and street fashion specialist
Reply With Quote
  #16  
Old 06-22-2007, 03:24 AM
 
dub713 dub713 is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 56
 

Default Re: Static Page for newsletter subscription or unsubscription

any more progress on this?

i'd love to just use a simple subscribe/unsubscribe instead of the whole new thing. i didn't find subscribe.php, but in modules, subscriptions, is subscription.php not sure if its of any help.

if anyone managed to get this working, post some final code for 1.6 and above.

thanks,
__________________
X-Cart version 4.1.7 - PHP 5.2. - MySQL server 5.0.41-community-nt - MySQL client 5.0.22 - Web server Apache/2.2.4 (Win32) - PHP/5.2.2
Reply With Quote
  #17  
Old 06-30-2007, 06:48 AM
  DataViking's Avatar 
DataViking DataViking is offline
 

eXpert
  
Join Date: Jan 2003
Location: Las Vegas, NV
Posts: 361
 

Default Re: Static Page for newsletter subscription or unsubscription

i'm also looking tosee how I can have a static subscription newsletter page in 4.1.7
__________________
Web Design Web Design and Custom X-Cart Projects

http://www.dataviking.com

Mention the forums for discounts!
x-cart Version 4.1.8
Reply With Quote
  #18  
Old 06-30-2007, 06:51 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Static Page for newsletter subscription or unsubscription

We use this successfully on static pages:

http://bcsengineering.com/store/customer/product.php?productid=139&cat=0&page=1
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #19  
Old 10-31-2007, 09:30 AM
  2coolbaby's Avatar 
2coolbaby 2coolbaby is offline
 

eXpert
  
Join Date: Sep 2004
Location: TN moving to FL
Posts: 265
 

Default Re: Static Page for newsletter subscription or unsubscription

I am like everyone else. 4.1.x has NO subscribe.php. This prevents being able to use this code, which I have on EVERY page of my website. I wonder if I could upload my 4.0.19 subscribe.php file there??? I will try it and let you know what happened.
__________________
Mary Lee
-------------------
Dinner and a Murder Mystery Games
http://www.dinnerandamurder.com

x-cart version 4.7.5 / Mac OS 10.10.5 and Windows 8/10 sometimes - Ideal Responsive Template
Reply With Quote
  #20  
Old 01-19-2008, 09:46 AM
  connemara's Avatar 
connemara connemara is offline
 

Senior Member
  
Join Date: Jan 2006
Location: Vancouver Island, Canada
Posts: 167
 

Default Re: Static Page for newsletter subscription or unsubscription

Did you find a solution to this?
I had such a nice subscribe form on static popup page from outside the cart on 4.0.8 version and with updated 4.1.9 can't seem to create proper static page from within the cart. Would love to know if adding the subscribe.php helped.
Connie
__________________
Versions 4.7.6
multiple mods and customizations
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 12:25 PM.

   

 
X-Cart forums © 2001-2020