![]() |
Static Page for newsletter subscription or unsubscription
Here's the standard code. It posts to itself, so the page can be stand alone with your headers and/or footers, or you can just make a small box on your index page or something. Lots of uses, so you can be creative.
If you copy all this code, modify your database settings, and rename it newsletter.php and upload it, it should work for you. Code:
<? |
If anybody uses this, please let me know :D
|
Just thought I'd add a tpl version of this, same sense, unsubscribe and subscribe forms on one page:
Code:
To subscribe to the newsletter, enter your email address and click "Subscribe". Kudos to Jon for sharing his code. :wink: |
Thanks for the .tpl
Thanks for the code Boomer. Quick question, what .tpl file do I modify to change the "thank you for subscribing" page?
|
Thanks Jon
Sweet Code. Worked great for me. Thanks for sharing it with us. Really Appreciate it.
|
Tried the .tpl version and I keep getting the error message "You have specidifed and incorrect e-mail address."
Anyone know why? |
i get the same "You have specified an incorrect e-mail address" when trying the code in a static html and in a tpl file
anyone know how this may be? http://www.innovativeoutlet.com/store/pages.php?pageid=2 thanks |
i found the fix for the Subscribe/Unsubscribe page by Boomer:
"You have specified an Incorrect e-mail address" in the subscribe part, change this Code:
To subscribe to the newsletter, enter your email address and click "Subscribe". to this Code:
To subscribe to the newsletter, enter your email address and click "Subscribe". notice the name changed from email to newsemail this fix worked with my version 4.0.17 |
Static Page for Newsletter subscribe-unsubscribe
I am using the great ideas from this post to add the subscribe onto the front page of our site, that is static, and separate from the store. That works great. BUT I would like the resulting message (your email was successfully added, or removed, etc) to open in a new window on its own without going into the cart itself. Can this be done and how? I can create the new window part, but how would I pull in the results?
Any help appreciated. Connie Manning added mod/ special offers |
You can use javascript in your form submission code to have it open in a new window. Just google for the code.
Nice to see other Vancouverites here :) |
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 |
I modified the shopcart/skin1/news.tpl to this version below:
Code:
<TABLE> |
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> |
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"> |
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 |
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, |
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
|
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 |
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.
|
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 |
Re: Static Page for newsletter subscription or unsubscription
OK Got somewhat of a solution, not completely resolved. I wanted to use an image to link and not use the standard subscribe box.
I created static page in the root, using the code from news.php because I also wanted to use the captcha part. Styled to match site. nice.(and thanks to others on this list whose suggestions led to that result). The image in the head template links to that static page, and opens up into a sized window using greybox technique so the customer can subscribe. When you subscribe, it goes to the thank you page within the cart. What I need is to ( (1) either pull that thank you into a different page that doesn't have the menu etc OR (2) a script to open to full page. Right now, the regular thank you page opens in that defined window (about 350 X 500) so it is pretty awful. Any recommendations please? VERSION 4.1.9 Connie |
Re: Static Page for newsletter subscription or unsubscription
Quote:
just change the ../mail/subscribe.php line to news.php as follows: (note: modified file path from original posts #3 & #eight) Code:
To subscribe to the newsletter, enter your email address and click "Subscribe". Tested and works fine in Static Pages in 4.1.9 Robert |
All times are GMT -8. The time now is 01:12 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.