Hi Dean,
First a couple of responses to your original post, and then I'll add some things at the end.
-----comment----
Yes, this seems straightforward. Upon successful purchase the user would be inserted into ListMail with, if I understand #3 correctly, a custom variable to determine whether the user would like to be included in followup email.
-------
Yes, but not entirely. It wouldn't have to be a custom variable, because the ListMail Pro database already has a "status" field. The status of any list member can be 1 of 4 values. Active, unconfirmed, removed, and bounced. If the person chose to subscribe, we could set the status to "1" (active). If they chose not to subscribe, we could set the status to "2" (removed).
The original thought here being that both databases (osCommerce & ListMail Pro) would contain up to date customer info, even if a customer didn't chose to subscribe. If a customer who didn't sign up logs into their account area (through the osCommerce system), they would see their current subscription shown as "unsubscribed" (removed).
There is also another way to do it, but it's a little tricky. I'll go into more details on that method later below.
----------comment--------
It sounds like you have the right idea! Be careful, though. I don't recommend necessarily removing features, but adding instead.
------------
You're right. It's better stated as adding/modifying rather than removing.
----------comment---------
I haven't used osCommerce myself... Am I correct that the user will be updating their 'profile' from within osCommerce and that changes made there should automatically update ListMail?
--------------
Yes. That's how I see it happening. Finding the area where osCommerce updates it's own database, and then adding on our custom code to access ListMail right after.
------comment---------
We need a way to link users in ListMail to users in osCommerce.
The user could be identified based on email address and ListMail-list / osCommerce-product #.
-------------
It may be better to use the customer id# that osCommerce assigns each customer paired up with their email address.
A single customer can place many orders containing many different products, so associating it with a product wouldn't work.
I suppose there is a theoretical issue if a site owner had mutliple websites, each with an osCommerce platform, and using the same Listmail Pro database for both (all). It would be possible that a customer who subscribed to both places could potentially be assigned the same customer ID# in both osCommerce databases. (making the custID# and email address values the same -- causing an incorrect update in ListMail).
Does that make sense? The chances are extremely slim, so I don't think it's a practical issue to worry about.
---------comment---------
I don't recommend adding an additional -field- to the osCommerce user database, where we might store the ListMail user ID#, as that might break things... but we -could- create a whole new separate table to store osCommerce ID vs. ListMail ID.
------------
I'm not sure it's needed if we keep the osCommerce platform as the dominant platform.
I think as long as we update the ListMail database everytime the osCommerce database is updated (in relation to customer first name, last name and email address) -- the data should be the same.
The only question is how we handle the remove requests that come in from the outgoing emails themselves.
If the remove link uses the osCommerce system to change the subscription status, then as long as we have the piggyback code inserted to modify the ListMail database -- everything should be fine.
If the remove link in an email uses the ListMail pro system to change subscription status -- then there should be an additional function which would update the osCommerce database.
I suppose we'll have to work through that one when we come to it.
--------comment-----------
The above code, run after purchase, would insert a user to list 1 if they are not already on it. We would want to insert some additional code above it to determine the list # based on product.
--------------
I suppose this could be useful, but for my project, that goes beyond the scope of my needs. Personally, I only need 2 lists.
1=customers -- people who have made a purchase
2=prospects -- people who have signed up for the newsletter, but NOT made a purchase.
-------comment--------
We would also want to take into account the custom option you mentioned, where you allow users to choose to 'subscribe' or not. On that subject, couldn't we just ignore users who choose not to subscribe as long as it doesn't create an error when updating or cancelling? Or, did you want the 'welcome' message from ListMail sent upon -any- purchase, regardless of the 'subscription' option?
----------------
Again, I think by adding a user who does not want to subscribe, it keeps the osCommerce database consistent. This is because when a customer fills out their info, if they chose not to subscribe, the osCommerce will still take all of the customer info because a sale is being made -- but it will simply classify the user as unsubscribed.
If we ignore this person and do not enter it into the ListMail Pro database, it could potentially cause errors (or concerns) later down the road if the customer ever updates their info or changes to subscribe. If the osCommerce software is looking to edit the ListMail Pro database values, but doesn't find any -- it could choke.
Entering every customer and appropriate status will prevent problems down the road, because even if the customer isn't receiving the email -- there will still be a record that the osCommerce pages can work with.
Above, I had mentioned an alternative way for creating a new list member with a "removed" status without accessing the ListMail pro database directly. It's a little tricky, but it seems to work. Here's what to do for that part:
1. First, call the ListMail pro signup page to add the person to a list. (#1 in this case)
http://www.yourlistmailhost.com/mail/signup.php?list=3&email=test@yahoo.com&fname=Bob&lname=Smith&seq=1&del=02. Next, call the ListMail pro removal page to change their status to removed.
http://www.asaplistmanager.com/mail/rem.php?x=5&l=1&e=test@yahoo.comThis will do the trick, but in order to make it clean -- you must change 2 settings. #1 is you must turn off the "Welcome" email. #2 is to make the removal link work with 1 click.
Setting #1: Select the list you're working with. (#1 in this example) Click on "List Settings". Uncheck the "Send welcome email" option and click Save.
Setting #2: Select "Message Codes". Click on "Global codes". Under the "remove link" function code, click on "Edit". Check the box that says "One-click Remove".
That will do it.
With this method, the "welcome email" will be disabled, so it may not work for everyone.
For me, I have the "Welcome" email setup to trigger in my osCommerce pages, so it's a viable solution. Since this thread is about integrating ListMail with osCommerce, I imagine other people can set it up that way as well.
That's enough typing for me for now -- my fingers are about to fall off.
Eli