X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Static Page for newsletter subscription or unsubscription (https://forum.x-cart.com/showthread.php?t=7033)

connemara 03-07-2006 04:24 PM

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
:D

ShishaPipeUK 03-12-2006 08:42 AM

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>


ShishaPipeUK 03-12-2006 10:53 AM

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>


balinor 03-06-2007 04:42 AM

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>


n00bert 04-21-2007 07:55 PM

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

dub713 06-22-2007 03:24 AM

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,

DataViking 06-30-2007 06:48 AM

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

balinor 06-30-2007 06:51 AM

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

2coolbaby 10-31-2007 09:30 AM

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.

connemara 01-19-2008 09:46 AM

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


All times are GMT -8. The time now is 01:10 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.