Setup and advice
- Brendan
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
11 months 3 weeks ago - 11 months 3 weeks ago #1
by Brendan
Setup and advice was created by Brendan
1. when I migrated from my last newsletter system I saw that NSPro only had one field for name, not first name, last name etc. As I wanted to send our newsletter with Hi {first_name} I modified my import csv with additional fields for name (combined first & last name), first_name, last_name. Now that I have got to the newsletter testing phase I see that NSPro can indeed use first name in templates. Is this done by NSP looking for the first part word in name field and assuming its the first name? This would work 99% of the time until you get asian names and multi-part first names which happen but rarely.
If so perhaps I can delete my extra fields as they are redundant, what do you suggest?
2. Our main SAAS requires clients register on our custom platform built on symfony which while on the same server is a separate platform to Joomla and also on a separate domain. We would like to include the newsletter subscription form in the registration process. So how can we go about this and is it possible to include a subscribe/subscribe function from the other site. Currently clients do not have or need a joomla account on our public website.
3. In my tests newsletters when I click the footer links, ie. Unsubscribe | Forward to Friend | Edit Preferences I get blank pages. I haven't actually published any newsletter yet of course. What am I doing wrong here?
Thank you
If so perhaps I can delete my extra fields as they are redundant, what do you suggest?
2. Our main SAAS requires clients register on our custom platform built on symfony which while on the same server is a separate platform to Joomla and also on a separate domain. We would like to include the newsletter subscription form in the registration process. So how can we go about this and is it possible to include a subscribe/subscribe function from the other site. Currently clients do not have or need a joomla account on our public website.
3. In my tests newsletters when I click the footer links, ie. Unsubscribe | Forward to Friend | Edit Preferences I get blank pages. I haven't actually published any newsletter yet of course. What am I doing wrong here?
Thank you
Last edit: 11 months 3 weeks ago by Brendan.
Please Log in or Create an account to join the conversation.
- Brendan
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
11 months 3 weeks ago #2
by Brendan
Replied by Brendan on topic Setup and advice
Hey Chris any help on these points? Especially point 3.
Please Log in or Create an account to join the conversation.
- Christopher Mavros
-
- Offline
- Administrator
-
11 months 3 weeks ago #3
by Christopher Mavros
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Replied by Christopher Mavros on topic Setup and advice
Hi Brendan,
Thank you for posting! It's better to separate topics thematically in the forum, to maintain readability. Don't worry about it, of course, just keep it in mind for future posts, if possible.
1. In an attempt to simplify subscription as much as possible, we chose a single name field. Some clients have chosen to make a "First Name" or "Last Name" field and use the "Name" field as the other part of the name, respectively.
NS Pro deducts the first name part of the name using the following algorithm:
You are free to choose your way to go. Either using a field, or the above algorithm (suggested by GPT)
I will come back on 2 and 3.
Thank you for posting! It's better to separate topics thematically in the forum, to maintain readability. Don't worry about it, of course, just keep it in mind for future posts, if possible.
1. In an attempt to simplify subscription as much as possible, we chose a single name field. Some clients have chosen to make a "First Name" or "Last Name" field and use the "Name" field as the other part of the name, respectively.
NS Pro deducts the first name part of the name using the following algorithm:
Code:
If Name is a single word:
First Name -> Name
Last Name -> Empty
If Name is exactly two words:
First Name -> first word
Last Name -> second word
If Name is exactly three words:
Check middle word. If it is one of the following: 'da', 'von', 'van', 'di', 'de', 'los', 'der', 'y', 'e', 'i', 'den', 'das', 'dos', 'da', 'del', 'della', 'le', 'zum', 'zur':
First Name -> first word
Last Name -> second word (one of the above) and third word
Otherwise:
First Name -> first and second word (assuming two first names)
Last Name -> third word
If Name is more than three words:
Check middle word. If it is one of the above mentioned:
First Name -> first word
Last Name -> the rest of the name
Otherwise:
First Name -> first and second word
Last Name -> the rest of the name
I will come back on 2 and 3.
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Please Log in or Create an account to join the conversation.
- Christopher Mavros
-
- Offline
- Administrator
-
11 months 3 weeks ago #4
by Christopher Mavros
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Replied by Christopher Mavros on topic Setup and advice
2. Since this is on the same server, you can theoretically load Joomla from within your SAAS platform, and use my lib.php add_or_update_subscriber() function.
This code is NOT guaranteed to work and probably not 100% future proof, but it gives you a starting point to work with NS Pro from outside of Joomla.
3. I probably need some more information about this. Can you enable system debug and error reporting and try these links again to report what they produce exactly?
Thanks again.
Code:
define( '_JEXEC', 1 );
define( 'JPATH_BASE', realpath('/absolute/path/to/joomla'));
require_once(JPATH_BASE . '/includes/defines.php');
require_once(JPATH_BASE.'/includes/framework.php');
$container = \Joomla\CMS\Factory::getContainer();
$container->alias('session.web', 'session.web.site')
->alias('session', 'session.web.site')
->alias('JSession', 'session.web.site')
->alias(\Joomla\CMS\Session\Session::class, 'session.web.site')
->alias(\Joomla\Session\Session::class, 'session.web.site')
->alias(\Joomla\Session\SessionInterface::class, 'session.web.site');
$app = $container->get(\Joomla\CMS\Application\SiteApplication::class);
\Joomla\CMS\Factory::$application = $app;
$app->createExtensionNamespaceMap();
require_once(JPATH_ADMINISTRATOR.'/components/com_nspro/lib.php');
add_or_update_subscriber($name, $email, $datetime, $conf, $mailing_lists);
This code is NOT guaranteed to work and probably not 100% future proof, but it gives you a starting point to work with NS Pro from outside of Joomla.
3. I probably need some more information about this. Can you enable system debug and error reporting and try these links again to report what they produce exactly?
Thanks again.
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Please Log in or Create an account to join the conversation.
- Brendan
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
11 months 3 weeks ago - 11 months 3 weeks ago #5
by Brendan
Replied by Brendan on topic Setup and advice
Hi, apologies, I'll definately separate issues next time. As I'm on a timeline to get this newsletter out I'll be circling back to 1 and 2.
With 3 I switched on debug but it shows nothing, I suspect it has something to do with how the developer set up my website, I have noticed before I can't see new areas until I add it to menu then set to hidden if I don't want it shown on menu. I can't do this with a dynamic url of course though. Perhaps I need to go back to that developer, any ideas on your end?
* update. When I added a menu item for Forward to Friend then that page loads correctly. But Unsubscribe and Edit Preferences just show a blank view, I use the Route 66 plugin for SEO and the options I excluded NS Pro which didn't help. With nothing coming up in the debug logs I'm not sure where to go from here.
With 3 I switched on debug but it shows nothing, I suspect it has something to do with how the developer set up my website, I have noticed before I can't see new areas until I add it to menu then set to hidden if I don't want it shown on menu. I can't do this with a dynamic url of course though. Perhaps I need to go back to that developer, any ideas on your end?
* update. When I added a menu item for Forward to Friend then that page loads correctly. But Unsubscribe and Edit Preferences just show a blank view, I use the Route 66 plugin for SEO and the options I excluded NS Pro which didn't help. With nothing coming up in the debug logs I'm not sure where to go from here.
Last edit: 11 months 3 weeks ago by Brendan.
Please Log in or Create an account to join the conversation.
- Christopher Mavros
-
- Offline
- Administrator
-
11 months 3 weeks ago #6
by Christopher Mavros
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Replied by Christopher Mavros on topic Setup and advice
If your developer has somehow disabled all access without a menu item, then they have disabled a large part of common Joomla functionalities, including Ajax requests and component URLs like the ones that NS Pro uses in these system links.
Have you also set the error reporting to maximum and still have no output?
Perhaps your developer can explain what we need to do to comply with your security preferences.
Thanks again.
Have you also set the error reporting to maximum and still have no output?
Perhaps your developer can explain what we need to do to comply with your security preferences.
Thanks again.
Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!
Please Log in or Create an account to join the conversation.
Moderators: Christopher Mavros