gregy Posted March 30, 2007 Share Posted March 30, 2007 (edited) got it working .. works great, but i have two questions; - deleting customer in customers.php is still not deleting email from phplist. Any fix for this? - is it possible to set somewhere that every registered customer is automatically added to newsletter. Of course he is able to unsubsrcibe later .. In this case checkbox would be hidden thanx for answers! Edited March 30, 2007 by gregy Quote Link to comment Share on other sites More sharing options...
mutter Posted March 31, 2007 Share Posted March 31, 2007 got it working .. works great, but i have two questions; - deleting customer in customers.php is still not deleting email from phplist. Any fix for this? - is it possible to set somewhere that every registered customer is automatically added to newsletter. Of course he is able to unsubsrcibe later .. In this case checkbox would be hidden thanx for answers! - If i remember, there isnt any code in the contrib for deleting customers email from phplist when you delete a customer. Should be easy to implement using the forgeinkey. - YOu could change the checkbox field in create_account.php to a hidden field with the same values of the checked when is checked or deleting the checkbox field from the form and set the $newsletter variable to true deleting the surrounding if statment. Quote Link to comment Share on other sites More sharing options...
gregy Posted March 31, 2007 Share Posted March 31, 2007 thanx for the answer .. since i'm no programer or coder i wonder how these lines should look like? <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" cellspacing="2" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_NEWSLETTER; ?></td> <td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td> </tr> </table></td> </tr> </table></td> thanks for support .. if someone can add lines for deleting emails in customers.php then this contrib. would be awesome! Quote Link to comment Share on other sites More sharing options...
mutter Posted March 31, 2007 Share Posted March 31, 2007 Try deleting this: <tr> <td class="main"><b><?php echo CATEGORY_OPTIONS; ?></b></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" cellspacing="2" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_NEWSLETTER; ?></td> <td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> Search for: if (isset($HTTP_POST_VARS['newsletter'])) { $newsletter = tep_db_prepare_input($HTTP_POST_VARS['newsletter']); } else { $newsletter = false; } Change it to: $newsletter = true; That should do what you want, later.. Quote Link to comment Share on other sites More sharing options...
gregy Posted March 31, 2007 Share Posted March 31, 2007 great! .. works like a charm! Thank you a lot. Now, i was thinking, what if user try to create an account with already entered email in phplist database, cause he was already signed up for newsletter? .. would script ignore email? Oscommerce will register customer, cause mail is not in osc database .. what will phplist say? Should i test this case? Quote Link to comment Share on other sites More sharing options...
mutter Posted April 7, 2007 Share Posted April 7, 2007 great! .. works like a charm! Thank you a lot. Now, i was thinking, what if user try to create an account with already entered email in phplist database, cause he was already signed up for newsletter? .. would script ignore email? Oscommerce will register customer, cause mail is not in osc database .. what will phplist say? Should i test this case? The customer will be registered to oscommerce as normal, if the user tick the checkbox he will be suscribed to the newsletter, set to confirmed and get a forgein key (customer id). If the user doesn't tick the box and he is already in phplist, he will be only be deleted from the newsletter assigned list. Quote Link to comment Share on other sites More sharing options...
superstyling Posted April 13, 2007 Share Posted April 13, 2007 Any ideas how to add products, specials, etc with images and buy now buttons to the phplist newsletter by retrieving them from the DB (such as newsletter products contrib. http://www.oscommerce.com/community/contributions,3398 ). This would make creating newsletters far easier than cutting and pasting. Quote Link to comment Share on other sites More sharing options...
Hade Posted April 26, 2007 Share Posted April 26, 2007 How can I update my existing users who have chosen to receive the newsletter? Is it a matter of copying the email address to the PHPList database and setting the foreign key to their customer ID? Do any changes have to be made to the customer entries in the OSC database? Thanks Quote Read the forum rules... Link to comment Share on other sites More sharing options...
Hade Posted April 26, 2007 Share Posted April 26, 2007 I've spotted an error. In admin/customers.php the newsletter field still reads from the old database. Add this line below Below: while ($customers = tep_db_fetch_array($customers_query)) { Add: // PHPlist PHPlist Newsletter add-on require(DIR_WS_INCLUDES . '/phplist_define.php'); //get the phplist specifics $existing_email_query = tep_db_query("select id, email, foreignkey from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where email = '" . $customers['customers_email_address'] . "'"); //check for existing by email address $existing_user_query = tep_db_query("select id, foreignkey, email from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where foreignkey = " . $customers['customers_id'] . ""); //check for existing by phplist userid in case they subscribed using another method. $existing_email = tep_db_fetch_array($existing_email_query); $existing_user = tep_db_fetch_array($existing_user_query); if (tep_db_num_rows($existing_user_query) > 0) //check for user subscription $newsletter_query = tep_db_query("select userid from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser where listid = " . PHPLIST_LISTNO . " and userid = " . $existing_user['id'] . ""); else $newsletter_query = tep_db_query("select userid from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser," . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where listid = " . PHPLIST_LISTNO . " and userid = id and email = '" . $customers['customers_email_address'] . "'"); $customers['customers_newsletter'] = ((tep_db_num_rows($newsletter_query) < 1) ? '0' : '1'); // End PHPlist Newsletter add-on Quote Read the forum rules... Link to comment Share on other sites More sharing options...
mutter Posted April 26, 2007 Share Posted April 26, 2007 I've spotted an error.In admin/customers.php the newsletter field still reads from the old database. Add this line below Below: while ($customers = tep_db_fetch_array($customers_query)) { Add: // PHPlist PHPlist Newsletter add-on require(DIR_WS_INCLUDES . '/phplist_define.php'); //get the phplist specifics $existing_email_query = tep_db_query("select id, email, foreignkey from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where email = '" . $customers['customers_email_address'] . "'"); //check for existing by email address $existing_user_query = tep_db_query("select id, foreignkey, email from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where foreignkey = " . $customers['customers_id'] . ""); //check for existing by phplist userid in case they subscribed using another method. $existing_email = tep_db_fetch_array($existing_email_query); $existing_user = tep_db_fetch_array($existing_user_query); if (tep_db_num_rows($existing_user_query) > 0) //check for user subscription $newsletter_query = tep_db_query("select userid from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser where listid = " . PHPLIST_LISTNO . " and userid = " . $existing_user['id'] . ""); else $newsletter_query = tep_db_query("select userid from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser," . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where listid = " . PHPLIST_LISTNO . " and userid = id and email = '" . $customers['customers_email_address'] . "'"); $customers['customers_newsletter'] = ((tep_db_num_rows($newsletter_query) < 1) ? '0' : '1'); // End PHPlist Newsletter add-on Can you explain the error please? Right now, when i delete or add an email to the list in phplist admin, the newsletter select field in admin/customers.php get actualized with the correct info. Quote Link to comment Share on other sites More sharing options...
Hade Posted May 1, 2007 Share Posted May 1, 2007 Can you explain the error please? Right now, when i delete or add an email to the list in phplist admin, the newsletter select field in admin/customers.php get actualized with the correct info. I found that within the customer list, the "Subscribed" fields on each row were not based on checks performed within the PHPlist database, but rather the Customers table of the OSC database. Specifically, the table's 'Newsletter' field. It seems this bit was not updated (which is the bit I added) Quote Read the forum rules... Link to comment Share on other sites More sharing options...
Dhananjaya Posted May 3, 2007 Share Posted May 3, 2007 Great idea, thanks for mentioning PHPlist. I was wondering two things.1. Some paid services offer the possability of having a queu of newsletters with each new subscriber starting at newsletter no1 and progressing through the newsletters at specified intervals. Do you think that such a functionality could be added to PHP list? 2. How reliably integrated is PHPlist to OSC? Thanks phplist doesn't do this but Infinite Responder does. http://infinite.ibasics.biz/ IR is not integrated with osc but the developer of it is very cooperative and economical to work with. Quote I have moved on from oscommerce to magento and no longer monitoring this site. Link to comment Share on other sites More sharing options...
gregy Posted May 10, 2007 Share Posted May 10, 2007 after phplist integration all my new customers are right away submited to phplist, but when i send message out my statistic says Sent: 2007-05-09 23:21:15Time to send: 34 mins 54 secs total text html both PDF both 9275 108 0 9171 0 0 and when i look at "Users" it says 9725 users in total ... all users are confirmed, and all are set ot one and only list in phplist ... where are all this users??? I believe this difference is since phplist integration ... Quote Link to comment Share on other sites More sharing options...
gregy Posted May 10, 2007 Share Posted May 10, 2007 hmm .. found out something else .. all users that are subscribed via OSC, aren't subscribed to any list. When i hit button (reconcile users) to subsribe all unsubscribed to list it says no users to apply !? in which table is this written? Quote Link to comment Share on other sites More sharing options...
hwinhoven Posted May 17, 2007 Share Posted May 17, 2007 Everything is up and working, thank you for the cool contrib. One problem that I am having is when a user signs up for an account they are not recieving the confirmation email that confirms your new oscommerce account. Any ideas? Quote Link to comment Share on other sites More sharing options...
gregy Posted May 24, 2007 Share Posted May 24, 2007 hmm .. found out something else .. all users that are subscribed via OSC, aren't subscribed to any list. When i hit button (reconcile users) to subsribe all unsubscribed to list it says no users to apply !? in which table is this written? found this in phplist_listuser table. Problems remain .. where can i put in code to subscribe them all to listID 7. As already mentioned above in a post i have hidden subscription on create_account.php? thank you for your help in advance! Quote Link to comment Share on other sites More sharing options...
Guest Posted May 28, 2007 Share Posted May 28, 2007 Any suggestions or recommendations on the best/proper way to migrate the people who were previously registered to the OSC newsletter to be added to PHPList? Quote Link to comment Share on other sites More sharing options...
Hade Posted June 30, 2007 Share Posted June 30, 2007 When users check/uncheck the subscribe option in account_newsletters.php I'd like it to insert/delete from the phplist database. How can I achieve this? At the moment, subscribing/unsubscribing on that page doesn't effect the phplist user table. Quote Read the forum rules... Link to comment Share on other sites More sharing options...
angel2005 Posted July 30, 2007 Share Posted July 30, 2007 hi, i install this contribution in oscommerce on local server. when i go to adlmin in oscommerce and select customers i have a error message. 1146 - La table 'catalog.listuser_user' n'existe pas select id, email, foreignkey from listuser_user where email = '[email protected]' u try different configuration in phplist_define.php, but i don't understand why i have this message. can someone help me? thank and regards. ps: sorry i'm french please can you be clear thank again.. Quote Link to comment Share on other sites More sharing options...
angel2005 Posted July 30, 2007 Share Posted July 30, 2007 sorry but i respond to mysefl, may be i'm so stupid but for people who have the same message, in the tree file to make change change all "user_user" by "user" for me it's working and resolve. thank for this contribution. Quote Link to comment Share on other sites More sharing options...
navyhost Posted September 19, 2007 Share Posted September 19, 2007 Hey, Got this installed and all seems to be working good. I was wondering if any one knows how to edit the check box on create account page so that it is preselected? thanks a bunch Quote Sincerely Mike Link to comment Share on other sites More sharing options...
azresta Posted October 2, 2007 Share Posted October 2, 2007 Just wondering if any one has gotten the contact us age integrated with the mod, if not does soemone have any half workups they wouldn't mind sharing to see if we can get this done. L Quote Link to comment Share on other sites More sharing options...
pascal2mi Posted December 11, 2007 Share Posted December 11, 2007 Hey, Got this installed and all seems to be working good. I was wondering if any one knows how to edit the check box on create account page so that it is preselected? thanks a bunch Beware, depending on were you leave this might be illigal (it is the case in the EU where opt in is mandatory). Pascal Quote Link to comment Share on other sites More sharing options...
gregy Posted April 14, 2008 Share Posted April 14, 2008 how to implement this if we gave more lists that can customer pickup? Quote Link to comment Share on other sites More sharing options...
valguss Posted May 15, 2008 Share Posted May 15, 2008 Hi There - i've just installed this contributuion and it seems to be working great- thanks However, becasue i've installed it late on, i have many customers in the database who aren't added to phpList. Has anyone worked on a script to import all these users? Cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.