Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PHPList integration to OsCommerce


higgalls

Recommended Posts

I just fixed this myself - i noticed that the table prefix default was PHPLIST_ whereas in phpMyAdmin, the table was showing up as phplist_ so i changed that and it now works.

Hope this info might be useful to anyone else who might have made this simple mistake!

 

I have another error and don't know how to sort it out

"1142 - SELECT command denied to user 'chaos_osc1'@'localhost' for table 'user_user'

 

select id, email, foreignkey from phplistdb.user_user where email = '[email protected]'

any suggestions

chaos_osc1 is oscommerce data base

chaos_plst1 is my phplist data base.

The user_user table, part of which database is that

 

Thanks

Link to comment
Share on other sites

  • Replies 116
  • Created
  • Last Reply

Top Posters In This Topic

I have another error and don't know how to sort it out

"1142 - SELECT command denied to user 'chaos_osc1'@'localhost' for table 'user_user'

 

select id, email, foreignkey from phplistdb.user_user where email = '[email protected]'

any suggestions

chaos_osc1 is oscommerce data base

chaos_plst1 is my phplist data base.

The user_user table, part of which database is that

 

Thanks

 

Hi,

 

All I can tell is that you either must not have the permissions set correctly for the database (as it appears that the user does not have the appropriate priveledges), or you have not set the database prefix in the mod for the PHPList database as 'chaos_plst1' (or maybe 'chaos_plst1_').

 

Regards,

Chris

Link to comment
Share on other sites

  • 2 weeks later...
Hi,

 

All I can tell is that you either must not have the permissions set correctly for the database (as it appears that the user does not have the appropriate priveledges), or you have not set the database prefix in the mod for the PHPList database as 'chaos_plst1' (or maybe 'chaos_plst1_').

 

Regards,

Chris

 

Chris-

 

Thanks for posting this in here, I was just about to dive into coding something similar to this. You saved me a ton of time.

 

-Ryan

rkoechel2004

Link to comment
Share on other sites

Chris-

 

Thanks for posting this in here, I was just about to dive into coding something similar to this. You saved me a ton of time.

 

-Ryan

 

Hey,

 

Not a problem.

 

Post any updates that you to it if you can :)

 

Cheers,

Chris

Link to comment
Share on other sites

Hey,

 

Not a problem.

 

Post any updates that you to it if you can :)

 

Cheers,

Chris

 

Thanks Chris

 

I still don't come right. I have changed priviledges to all for all users on both databases.

Here is how my config file looks

 

define('PHPLIST_DB', 'phplistdb.'); //the name of the phplist database if same as osC, leave blank

define('PHPLIST_TABLE_PREFIX', ''); //if a table prefix is used give it here (if none, leave blank)

define('PHPLIST_LISTNO', '2'); //the listnumber to subscribe/unsubscribe users to/from (must have been created in phplist)

 

where should what go

 

Thanks

Wilco

Link to comment
Share on other sites

Thanks Chris

 

I still don't come right. I have changed priviledges to all for all users on both databases.

Here is how my config file looks

 

define('PHPLIST_DB', 'phplistdb.'); //the name of the phplist database if same as osC, leave blank

define('PHPLIST_TABLE_PREFIX', ''); //if a table prefix is used give it here (if none, leave blank)

define('PHPLIST_LISTNO', '2'); //the listnumber to subscribe/unsubscribe users to/from (must have been created in phplist)

 

where should what go

 

Thanks

Wilco

 

Hey,

 

Sorry but im a bit confused (could be because I just woke up though).

What is the actual problem you are having?

 

You will have 2 databases: 1 for OsCommerce, and 1 for PHPList.

 

You should already have PHPList installed and working in order to use this mod. If you dont, then you need to get it installed and working FIRST, and then try this mod.

 

Do you know how to set those configuration options?

 

It has been a long time since I installed this contrib, so I can't really rememeber how I got it working.

I do remember that I did have an error at some stage and it was because I don't use any attributes in PHPList (for things such as First Name, Last Name, Country, etc). What I did was in the file that links OsCommerce across to PHPList, I simply commented out the lines where it refers to attributes, and then it worked.

 

Sorry I can't be of any more help at the moment.

 

Cheers,

Chris

Link to comment
Share on other sites

Hey,

 

Sorry but im a bit confused (could be because I just woke up though).

What is the actual problem you are having?

 

You will have 2 databases: 1 for OsCommerce, and 1 for PHPList.

 

You should already have PHPList installed and working in order to use this mod. If you dont, then you need to get it installed and working FIRST, and then try this mod.

 

Do you know how to set those configuration options?

 

It has been a long time since I installed this contrib, so I can't really rememeber how I got it working.

I do remember that I did have an error at some stage and it was because I don't use any attributes in PHPList (for things such as First Name, Last Name, Country, etc). What I did was in the file that links OsCommerce across to PHPList, I simply commented out the lines where it refers to attributes, and then it worked.

 

Sorry I can't be of any more help at the moment.

 

Cheers,

Chris

 

Chris

Yes I have 2 databases nl. chaospag_osc1 and chaospag_plst1

 

Phplist and osc are up and running without errors for about 3 months already. It's just when I installed the mod that I got the error

1142 - SELECT command denied to user 'chaospag_osc1'@'localhost' for table 'phplist_user_user'

 

select id, email, foreignkey from phplistdb.phplist_user_user where email = '[email protected]'

 

[TEP STOP]

 

There are 3 osc files that you have to mod : (according to install doc only add and replace)

catalog/create_account.php

catalog/account_newsletters.php

catalog/admin/customers.php

 

2 new files:

catalog/includes/phplist_define.php

catalog/admin/includes/phplist_define.php

 

I have changed the define files to what ever I could and still get the error, Is there anything I have to define in the 3 osc files.

Please try and help once more, if I don't get it to work I will stop and remove the mod.

 

Thanks

Wilco

Link to comment
Share on other sites

  • 2 weeks later...

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-_phplist.phplist_user_user where email = '[email protected]'' at line 1

 

select id, email, foreignkey from rocketz_net_-_phplist.phplist_user_user where email = '[email protected]'

 

 

Hmm...syntax error....

 

can someone suggest me where to look for??

 

james

Link to comment
Share on other sites

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-_phplist.phplist_user_user where email = '[email protected]'' at line 1

 

select id, email, foreignkey from rocketz_net_-_phplist.phplist_user_user where email = '[email protected]'

Hmm...syntax error....

 

can someone suggest me where to look for??

 

james

 

This happens with the file account_newsletters.php.

 

thanks in advance.

Link to comment
Share on other sites

Chris

Yes I have 2 databases nl. chaospag_osc1 and chaospag_plst1

 

Phplist and osc are up and running without errors for about 3 months already. It's just when I installed the mod that I got the error

 

There are 3 osc files that you have to mod : (according to install doc only add and replace)

catalog/create_account.php

catalog/account_newsletters.php

catalog/admin/customers.php

 

2 new files:

catalog/includes/phplist_define.php

catalog/admin/includes/phplist_define.php

 

I have changed the define files to what ever I could and still get the error, Is there anything I have to define in the 3 osc files.

Please try and help once more, if I don't get it to work I will stop and remove the mod.

 

Thanks

Wilco

 

Hi Wilco,

 

You seem to have problem with permissions for user chaospag_osc1, this user must have permissions to connect to, alter and so on the phplist database.

 

This mod is made in the way that is uses the same database user for both databases. Ie. it uses the username that has privileges for the Oscommerce database to connect to the phplist db, because of this you must set up the same db user for both databases or give the oscommerce db user privileges/permissions to the phplist db.

 

This can be done through commandline, phpmyadmin (if permitted by hosting provider) or by some other way supported by the hosting provider.

 

If you can't control creation, permissions or other handling of database users, I am sorry, this mod is not for you (at least not in its present state). I don't have either the need for or knowledge in rewriting the mod for this purpose.

 

Regards

Thomas A.

Link to comment
Share on other sites

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-_phplist.phplist_user_user where email = '[email protected]'' at line 1

 

select id, email, foreignkey from rocketz_net_-_phplist.phplist_user_user where email = '[email protected]'

Hmm...syntax error....

 

can someone suggest me where to look for??

 

james

 

 

Hi James,

 

This seems to be a database name problem, are you sure your database name is 'rocketz_net_-_phplist'?

 

Isn't it possible it should be 'rocketz_net_phplist' instead?

 

I think the sytax error is reffering to the '-'-sign, this sign is probably not allowed in mysql naming conventions.

 

Regards

Thomas A.

Link to comment
Share on other sites

  • 1 month later...

I do not want to pass the last name across to PHPList so I leave the attribute for last name empty as instructed.

 

define('PHPLIST_LASTNAME', ' '); //the atributenumber for the users lastname (if created in phplist otherwise leave empty)

 

But I get the following error message:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 7603, 'aaaaaaaaalast')' at line 1

insert into virtua38_plst1.phplist_user_user_attribute (attributeid, userid, value) values ( , 7603, 'aaaaaaaaalast')

[TEP STOP]

 

I tried putting a space as well as leaving the field empty - both produced the same error.

Any ideas what is causing this problem?

Link to comment
Share on other sites

I do not want to pass the last name across to PHPList so I leave the attribute for last name empty as instructed.

 

define('PHPLIST_LASTNAME', ' '); //the atributenumber for the users lastname (if created in phplist otherwise leave empty)

 

But I get the following error message:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 7603, 'aaaaaaaaalast')' at line 1

insert into virtua38_plst1.phplist_user_user_attribute (attributeid, userid, value) values ( , 7603, 'aaaaaaaaalast')

[TEP STOP]

 

I tried putting a space as well as leaving the field empty - both produced the same error.

Any ideas what is causing this problem?

 

In the script, go through and remove any line that has reference to attributes as that is what is causing the problem. I had to remove those lines myself, and it is working fine.

 

Let me know how you go.

 

Cheers,

Chris

Link to comment
Share on other sites

In the script, go through and remove any line that has reference to attributes as that is what is causing the problem. I had to remove those lines myself, and it is working fine.

 

Let me know how you go.

 

Cheers,

Chris

 

Thanks Chris for the suggestion. For the time being I created the lastname attribute in PHPlist and set it to not-required. That seems to be a work around that avoids having to change the code.

Barry

Link to comment
Share on other sites

Problem with making two database users the same name.

 

I have another osCommerce installation that I want to use with my phplist database. The problem is that they are both on different servers. When you create a new database user on the server it prefixes the user name with the login name for the server.

 

For example all users on my server virtua38 begin with server1_ for example server_user1

All users on my other server begin with server2_, so even if I choose the same name (user1 in phpMyAdmin), the actual user name is different i.e. server1_user1.

 

This obviously causes a problem when you want to add the same user that is accessing your osCommerce database to your PHPlist database, since it is impossible to create two users having the same name.

 

Can anyone suggest any solution (apart from moving both applications to the same server)?

 

Thanks anyone.

Barry

Link to comment
Share on other sites

  • 3 weeks later...

This contribution is great!

I tested it and all worked well.

But when I delete a customer in osCommerce, I find that the customer isn't be removed in Phplist.

Any reason for this?

Everyone is changing the world.

Everyone is a world.

For everyone needs my help, PM or email if I amn't online.

Link to comment
Share on other sites

This contribution is great!

I tested it and all worked well.

But when I delete a customer in osCommerce, I find that the customer isn't be removed in Phplist.

Any reason for this?

 

Maybe that function wasn't coded. If you can code it and put it in the contrib area then that would be great.

 

Cheers,

Chris

Link to comment
Share on other sites

Hey Everyone,

 

Needing your help with finishing the phplist integration to the contact_us.php page.

Basically, it is not adding the email address to the phplist database.

 

Here is the code:

<?php
/*
 $Id: contact_us.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce  Released under the GNU General Public License

Modified for VN2 Free Skin E by Kevin jeffery - www.vn2designs.com
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);

 $error = false;
 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) {
$name = tep_db_prepare_input($HTTP_POST_VARS['name']);
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);
if (isset($HTTP_POST_VARS['newsletter'])) {
  $newsletter = tep_db_prepare_input($HTTP_POST_VARS['newsletter']);
} else {
  $newsletter = false;
}
if (tep_validate_email($email_address)) {
  tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);
  if(SEND_CONTACT_US_RESPONSE=='true')
  tep_mail($name, $email_address, CONTACT_US_RESPONSE_EMAIL_SUBJECT, CONTACT_US_RESPONSE_EMAIL_TEXT."\n\n-------------------------Your Message:\n".$enquiry, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
  tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success'));
} else {
  $error = true;

  $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
}
}

// Begin PHPlist Newsletter add-on
   require(DIR_WS_INCLUDES . '/phplist_define.php'); //get the phplist specifics
   //get user specifics from PHPlist
   $existing_email_query = tep_db_query("select id, email, foreignkey from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where email = '" . $email_address . "'"); //check for existing by email address
   $history_systeminfo_text = "\nHTTP_USER_AGENT = " . $_SERVER["HTTP_USER_AGENT"] ."\nHTTP_REFERER = " . $_SERVER["HTTP_REFERER"] . "\nREMOTE_ADDR = " . $_SERVER["REMOTE_ADDR"] . "";
   $history_detail_text = "";
   //subscribe logic
   if ($newsletter) {
	 if (tep_db_num_rows($existing_email_query) < 1) { //no existing user by email address found (therefore a new user - no id or email found)
	   $id = md5(uniqid(mt_rand())); //generate unique id and add new user to database
	   tep_db_query("insert into " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user (email, confirmed, subscribepage, entered, modified, disabled, uniqid, htmlemail, foreignkey) values ('" . $email_address . "', 1, " . PHPLIST_SPAGE . ", now(), now(), 0, '" . $id . "', " . PHPLIST_HTMLEMAIL . ", " . $customer_id . ")"); //insert the new user into phplist
	   $user_query=tep_db_query("select id from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where email = '" . $email_address . "'"); //get the new user's phplist id
	   $user = tep_db_fetch_array($user_query);
	   //tep_db_query("insert into " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user_attribute (attributeid, userid, value) values (" . PHPLIST_FIRSTNAME . ", " . $user['id'] . ", '" . $firstname . "')"); //add the users firstname to the attributes table
	   //tep_db_query("insert into " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user_attribute (attributeid, userid, value) values (" . PHPLIST_LASTNAME . ", " . $user['id'] . ", '" . $lastname . "')"); //add the users lastname to the attributes table
	   tep_db_query("insert into " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser (userid, listid, entered) values (" . $user['id'] . ", " . PHPLIST_LISTNO . ", now())"); //subscribe the new user to the correct list
	   //generating history
	   $history_detail_text .= "\nSubscribepage = " . PHPLIST_SPAGE . "\nforeign key = " . $customer_id . "\n";
	   //$attribute_name_query = tep_db_query("select name from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_attribute where id = " . PHPLIST_FIRSTNAME . "");
	   //$attribute_name = tep_db_fetch_array($attribute_name_query);
	   //$history_detail_text .= "" . $attribute_name[name] . " = " . $firstname . "\n";
	   //$attribute_name_query = tep_db_query("select name from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_attribute where id = " . PHPLIST_LASTNAME . "");
	   //$attribute_name = tep_db_fetch_array($attribute_name_query);
	   //$history_detail_text .= "" . $attribute_name[name] . " = " . $lastname . "\n";
	   $list_name_query = tep_db_query("select name from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "list where id = " . PHPLIST_LISTNO . "");
	   $list_name = tep_db_fetch_array($list_name_query);
	   $history_detail_text .= "\nList subscriptions:\n" . $list_name['name'] . "";
	   tep_db_query("insert into " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user_history (userid, ip, date, summary, detail, systeminfo) values (" . $user['id'] . ", '" . $_SERVER["REMOTE_ADDR"] . "', '" . date('Y-m-d H:i:s') . "', 'Update through osC', '" . $history_detail_text . "', '" . $history_systeminfo_text . "')"); //create history post
	 }
	 else { //subscribe the existing user if disabled and add foreignkey match to customer_id
	   $existing_email = tep_db_fetch_array($existing_email_query); //existing user by email found
	   tep_db_query("update " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user set disabled = 0, confirmed = 1, foreignkey = " . $customer_id . " where id = " . $existing_email['id'] . "");
	   $history_detail_text .= "foreign key = " . $customer_id . "\nchanged from ";
	   //check to see if they already are subscribed to the correct list
	   $list_query = tep_db_query("select * from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser where userid = " . $existing_email['id'] . " and listid = " . PHPLIST_LISTNO . "");
	   if ($list=tep_db_num_rows($list_query) < 1) { //no existing subscription to the newsletter found
		 //generating history, previous subscriptions
		 $history_detail_text .= "\n\nList subscriptions:\n";
		 $existing_subscription_query = tep_db_query("select li.name from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "list li, " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser lu where li.id = lu.listid and lu.userid = " . $existing_email['id'] . "");
		 if (tep_db_num_rows($existing_subscription_query) < 1) {
		   $history_detail_text .= "Was subscribed to: \n";
		 } else {
		   while($existing_subscription = tep_db_fetch_array($existing_subscription_query)){
			 $history_detail_text .= "Was subscribed to: " . $existing_subscription[name] . "\n";
		   }
		 }
		 tep_db_query("insert into " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser (userid, listid, entered) values (" . $existing_email['id'] . ", " . PHPLIST_LISTNO . ", now())"); //subscribe the new user to the correct list
		 //generating history, current (updated) subscriptions
		 $updated_subscription_query = tep_db_query("select li.name from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "list li, " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser lu where li.id = lu.listid and lu.userid = " . $existing_email['id'] . "");
		 while ($updated_subscription = tep_db_fetch_array($updated_subscription_query)) {
		   $history_detail_text .= "Is now subscribed to: " . $updated_subscription[name] . "\n";
		 }
	   }
	   tep_db_query("insert into " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user_history (userid, ip, date, summary, detail, systeminfo) values (" . $existing_email['id'] . ", '" . $_SERVER["REMOTE_ADDR"] . "', '" . date('Y-m-d H:i:s') . "', 'Update through osC', '" . $history_detail_text . "', '" . $history_systeminfo_text . "')"); //create history post
	 }
   }
// End PHPlist Newsletter add-on
 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<META NAME="publisher" CONTENT="HostingosCommerce.com">
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="760" align="center" cellspacing="0" cellpadding="0" background="images/mainbg.jpg">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="440" align="center" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_contact_us.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if ($messageStack->size('contact') > 0) {
?>
  <tr>
	<td><?php echo $messageStack->output('contact'); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }

 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {
?>
  <tr>
	<td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<?php
 } else {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
			<td class="main">If you have any enquries, please feel free to email us at <a href="mailto:[email protected]">[email protected]</a>, or feel free to use the following form.<br><br></td>
		  </tr>
		  <tr>
			<td class="main"><?php echo ENTRY_NAME; ?></td>
		  </tr>
		  <tr>
			<td class="main"><?php echo tep_draw_input_field('name'); ?></td>
		  </tr>
		  <tr>
			<td class="main"><?php echo ENTRY_EMAIL; ?></td>
		  </tr>
		  <tr>
			<td class="main"><?php echo tep_draw_input_field('email'); ?></td>
		  </tr>
<tr>
			<td class="main">Subscribe to Newsletter?
			<?php echo tep_draw_checkbox_field('newsletter', '1',checked) . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td>
</tr>
		  <tr>
			<td class="main"><?php echo ENTRY_ENQUIRY; ?></td>
		  </tr>
		  <tr>
			<td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<?php
 }
?>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Has anyone got any idea?

I want to get this going asap. It has been ages with it not working from the contact us page.

 

Cheers,

Chris

Link to comment
Share on other sites

  • 2 weeks later...
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-_phplist.phplist_user_user where email = '[email protected]'' at line 1

 

select id, email, foreignkey from rocketz_net_-_phplist.phplist_user_user where email = '[email protected]'

Hmm...syntax error....

 

can someone suggest me where to look for??

 

james

 

 

I've got the exact same problem with my install. Did you ever get an answer or figure out how to

fix this error?

Link to comment
Share on other sites

  • 4 weeks later...

i have another question. If i understood you well, only customers may enter mailing list. What about visitors.

 

I.e. I don't want to buy anything or register. Then i suppose you don't want me on your mailing list?

Link to comment
Share on other sites

and another question (dunno why i can't edit previous post)

 

i'm trying to add subscription code (which is working in separate file) into infobox

 

The code is

 

<!-- mailing //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_MAILING);

 new infoBoxHeading($info_box_contents, false, false, false, $column_location);

 $info_box_contents = array();
 $info_box_contents[] = array('text'  => '<script language="Javascript" type="text/javascript">
var fieldstocheck = new Array();
fieldnames = new Array();
function checkform() {
 for (i=0;i<fieldstocheck.length;i++) {
if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].value") == "") {
  alert("Prosimo vnesite  "+fieldnames[i]);
  eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");
  return false;
}
 }

 return true;
}

function addFieldToCheck(value,name) {
 fieldstocheck[fieldstocheck.length] = value;
 fieldnames[fieldnames.length] = name;
}

function compareEmail()
{
 return (document.subscribeform.elements["email"].value == document.subscribeform.elements["emailconfirm"].value);
}
</script>
<form method="post" action="http://www.domain.com/mailing/lists/?p=subscribe" name="subscribeform"><table border="0">
 <tbody><tr><td colspan="2"><div class="required">Elektronski naslov</div><input name="email" value="" size="20" type="text">
 <script language="Javascript" type="text/javascript">addFieldToCheck("email","Elektronski naslov");</script></td>
  </tr><tr><td colspan="2">
  <div class="required">Ime in Priimek</div>
		<input name="attribute1" class="attributeinput" size="20" value="" type="text"><script language="Javascript" type="text/javascript">addFieldToCheck("attribute1","Ime in Priimek");</script></td></tr>

<tr><td>
	<span class="attributename">Format<br>
	sporočila:</span><br>
	<span class="attributeinput"><input name="htmlemail" value="0" type="radio"></span>
	<span class="attributename">Tekst<br>
	</span><span class="attributeinput"><input name="htmlemail" value="1" checked="checked" type="radio"></span>

	<span class="attributename">HTML</span></td><td>
	<input name="list[7]" value="signup" type="hidden"><input name="listname[7]" value="Vstopnice.com" type="hidden"><input name="subscribe" value="Prijava" onclick="return checkform();" type="submit"></p>
</form></td></tr>
</tbody></table><a href="http://www.domain.com/mailing/lists/?p=unsubscribe&id=3">Odjavi</a>');



 new infoBox($info_box_contents, $column_location);
?>
		</td>
	  </tr>


<!-- mailing_eof //-->

 

but this code stops page from loading when comes to this infobox?

 

any help please?

Link to comment
Share on other sites

Thanks Chris for the suggestion. For the time being I created the lastname attribute in PHPlist and set it to not-required. That seems to be a work around that avoids having to change the code.

Barry

 

Interesting workaround. Worked for me, except I had to also do the same for the firstname attribute.

 

I'm still interested in finding out why this error occurred.

 

Christine

http://www.epiccycling.com/

Link to comment
Share on other sites

Hey this worked great!

I had to work with getting this part set up just right...

 

define('PHPLIST_DB', 'mydatabase_phplist.'); //the name of the phplist database if same as osC, leave blank

define('PHPLIST_TABLE_PREFIX', 'phplist_'); //if a table prefix is used give it here (if none, leave blank)

 

I just tried all the different ways, with and without the _ and with and without the . and with and without the PREFIX all together.

 

Finally this final result up top worked out. Also had to remember to do it in BOTH the ADMIN and the NORMAL section.

 

Also, the way I have my databases set up in phpMyAdmin are like so...

 

MYSITE

_phplist

_store

_shows

_forum

 

So each database for different systems are sub groups under my main website

 

MYSITE_phplist

MYSITE_store

 

So they are separate databases but fall under the same group.

 

 

 

What my question is, can you either A) export the list of emails in OsCommerce or B) can I send all the emails to phpList from OsCommerce using this?

 

Also, is this supposed to change the "Send Email" and "Newsletter" sections in the OsCommerce Admin section into phpList functions?

 

Thanks again this is a wonderful start to my site wide conversion process!

 

j

Link to comment
Share on other sites

  • 1 month later...

Hello. PHPList was installed via Fantastico on my Lunarpages server (in it's own dir.). It trashed the admin side of my store. I can now only get to the /catalog/admin page, but i get 'server not found' when attempting to access any of the selections on the admin page. (customers, tools, etc....) It also changed my admin access password to the password i created when installing PHPList! My store is live and i now have to go into the db to get customer data for EVERY order. Any suggestions/help would be MOST appreciated.

Thanks

Tom

Link to comment
Share on other sites

Hello. PHPList was installed via Fantastico on my Lunarpages server (in it's own dir.). It trashed the admin side of my store. I can now only get to the /catalog/admin page, but i get 'server not found' when attempting to access any of the selections on the admin page. (customers, tools, etc....) It also changed my admin access password to the password i created when installing PHPList! My store is live and i now have to go into the db to get customer data for EVERY order. Any suggestions/help would be MOST appreciated.

Thanks

Tom

Hi,

 

Re-upload the Admin section from your catalog, either through a backup, or by downloading all of OsCommerce and then getting the Admin section from that (preferably from your own backup though).

 

Regards,

Chris

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...