![]() |
HELP!!!!!!!!!!!
What would the smarty code need to be just to display the content of the table that holds the email addresses of the newsletter subscribers?
Please help. Thanks John |
Not quite a simple as that really.
The first step is creating a php script that will pull the info from the database and assign it to smarty. You can then display this with a template. Or you could export the data straight from the database using phpmyadmin if you have it. |
You can use this code I modified from one I created for another purpose:
Code:
<?php This pulls the newsletter email addresses out as well as linking to the customer table and getting the first and last name. Copy this into a text file, fill in your specific database information, save as newsletter_maillist.php or something like that, then post it up in a secure folder on your site (.htaccess protected or something) and just call it up by URL:http://www.yoursite.com/yoursecurefolder/newsletter_maillist.php A better way would be to use the auth.php and config.php to get access to the db, but I couldn't figure out how to incorporate them into what I was trying to do. I'm fairly new to PHP and MySQL. Maybe funky can add advice on this and how to then assign to smarty if he's so inclined... :D hth |
Looks good so far.
Looks good so far. Initial tests have been successful.
Will keep you posted. |
This script works
This script works.
Now how do I stick it inside an xcart template? |
Well, that would take me a bit of time to figure out (which I currently don't have at the moment), since it's the part where you would do that smarty stuff.
Sorry to bail on you, but maybe one of the gurus can post a quick reply... |
I appreciate your help anyways.
I appreciate your help anyways.
I can force it to work, but it'll be a little sloppy. I'm sure it would be a breeze for one of the masters like Funkydunk. For me so far I can get the job done but it might be a little messy under the hood. You put me on the right track and your help is greatly appreciated. Thanks, John |
okay .... here goes :)
new file: admin/subscriber_list.php Code:
<? add in to the central area: Code:
{elseif $main eq "subscribers"} new template: admin/main/subscriber_list.tpl Code:
{* subscriber_list.tpl - funkydunk 2003 *} |
Nice job funky! :D I knew you'd have no problem with this.
|
works on 3.3.x haven't tested on 3.4.x .
thanks |
might wanna add a link to remove any crap email addresses (updated)
Code:
{include file="location.tpl" last_location="Subscriber List"} {if $smarty.get.usertype Works on v3.4.3. thanks for the mod :wink: |
good improvement
|
Thank for your help Funky
Thank for your help Funky
But for some reason I'm getting a blank screen. Probobly somthing simple. |
did you make the amends in home.tpl?
|
...
I added
{elseif $main eq "subscribers"} {include file="admin/main/subscriber_list.tpl"} to the central space. all I have to run is subscriber_list.php and this should work right? or is there another string involved? |
admin/subscriber_list.php - once logged into admin
|
Hmm thats what I thought.
Hmm thats what I thought.
I wonder why its coming up blank. By the way did you get my pm? |
John,
Did we resolve this? |
Well
I'm sure your script works since you tested it and it works for you.
Its got to just be a matter of how the script is installed on my end. I personally didn't get it to work yet, but havent had time to get back to it in a while. So many other things have come between since. I'll try it again soon with a fresh install. Thanks John7 |
now, how do we sort it alphabetical for easy email lookup?
|
Code:
// this is the vastly complex query |
don't forget the space in
order by |
edited :)
|
THanks for sharing :roll:
|
is there also a way to have a running total at the top of the list that shows how many people are subscribed to the newsletter?
one more thing, in the code itself. in the line {$config.Company.company_website}/mail/unsubscribe.php?email={$subscribers I had to add the following {$config.Company.company_website}/xcart/mail/unsubscribe.php?email={$subscribers since the directory where I keep the cart is xcart, and not directly to the mail folder. just thought Id add that |
This thread screams for pointing some people towards marketing manager :wink:
Ok we are now officially asking for more suggestions and ideas for extra add on x-cart modules for MM, any ideas/wishes you have please PM or email them to me, we're taking on board loads and many of the good ones will be developed into low cost add ons. We've already developed and covered most of the wishes/request for x-cart newsletter list control for exports/imports/edit/deletes etc. |
All times are GMT -8. The time now is 08:16 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.