Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error 1054 - Unknown column 'customers_paypal_ec'


Guest

Recommended Posts

I recieve this message when I try to create a customer account on my create_account.php page.

 

1054 - Unknown column 'customers_paypal_ec' in 'field list'

select customers_id as id, customers_paypal_ec as ec from customers where customers_email_address = 'myemailaddress.com'

[TEP STOP]

 

 

Any idea what this means?

Link to comment
Share on other sites

I recieve this message when I try to create a customer account on my create_account.php page.

 

1054 - Unknown column 'customers_paypal_ec' in 'field list'

select customers_id as id, customers_paypal_ec as ec from customers where customers_email_address = 'myemailaddress.com'

[TEP STOP]

Any idea what this means?

 

 

Looks like you added a paypal contribution without running the sql file.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

Looks like you added a paypal contribution without running the sql file.

 

I'm actually trying to fix a few things on a friends site. I've figured out how to do a couple of the things she wanted, unfortuneately I'm trying to figure out how the osCommerce "system" works in a relitively short time span as the site was originally created by someone else. So I'm Very new to this platform. Please excuse my ignorance, but I'm not sure what you mean by "added a paypal contribution without running the sql file"? Can you please explain?

Link to comment
Share on other sites

I'm actually trying to fix a few things on a friends site. I've figured out how to do a couple of the things she wanted, unfortuneately I'm trying to figure out how the osCommerce "system" works in a relitively short time span as the site was originally created by someone else. So I'm Very new to this platform. Please excuse my ignorance, but I'm not sure what you mean by "added a paypal contribution without running the sql file"? Can you please explain?

 

OK did some digging and found this statement on the create_account.php, does this look OK? It appears that the error message might be coming for here?

 

//---PayPal WPP Modification START ---//

//$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

$check_email_query = tep_db_query("select customers_id as id, customers_paypal_ec as ec from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

if (tep_db_num_rows($check_email_query) > 0) {

$check_email = tep_db_fetch_array($check_email_query);

if ($check_email['ec'] == '1') {

//It's a temp account, so delete it and let the user create a new one

tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$check_email['id'] . "'");

tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$check_email['id'] . "'");

tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$check_email['id'] . "'");

tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$check_email['id'] . "'");

tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$check_email['id'] . "'");

tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . (int)$check_email['id'] . "'");

} else {

$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);

}

//---PayPal WPP Modification END---//

Link to comment
Share on other sites

the contribution has an .sql file. Use the phpmyadmin tool of your host click the sql tab and load the sql file to generate the necessary columns and/or sql tables.

Link to comment
Share on other sites

  • 1 month later...
the contribution has an .sql file. Use the phpmyadmin tool of your host click the sql tab and load the sql file to generate the necessary columns and/or sql tables.

 

OK, I'm back again trying to tackle my problem. After deleting the "customers_paypal_ec as ec" from the statement in the "create_account.php" file, I was able to create a new customer account. But, Please excuse my egnorance, but bare with me. Now I'm receiving an error message, when trying to process an order through paypal: "An error occurred when we tried to contact PayPal's servers". and I received an email titled: Paypal error dump and in the body of the message it states: "In function: ec_step 1()"

 

After reviewing the paypal_wpp.php file, it appears that this file is trying to access information in the "customers" table and this table does not have the required fields.

 

Like "customers_paypal_payerid" and "customers_paypal_ec".

 

For instance: "$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_lastname, customers_paypal_payerid, customers_paypal_ec from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($paypal_ec_payer_info['payer_email']) . "'");

 

Can you explain this process? I've got access to the phpmyadmin tool, found the "customers" table and these fields are not there. I clicked on the sql tab and then I'm lost. How do I load the sql file? How do I access this file?

Link to comment
Share on other sites

OK, I'm back again trying to tackle my problem. After deleting the "customers_paypal_ec as ec" from the statement in the "create_account.php" file, I was able to create a new customer account. But, Please excuse my egnorance, but bare with me. Now I'm receiving an error message, when trying to process an order through paypal: "An error occurred when we tried to contact PayPal's servers". and I received an email titled: Paypal error dump and in the body of the message it states: "In function: ec_step 1()"

 

After reviewing the paypal_wpp.php file, it appears that this file is trying to access information in the "customers" table and this table does not have the required fields.

 

Like "customers_paypal_payerid" and "customers_paypal_ec".

 

For instance: "$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_lastname, customers_paypal_payerid, customers_paypal_ec from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($paypal_ec_payer_info['payer_email']) . "'");

 

Can you explain this process? I've got access to the phpmyadmin tool, found the "customers" table and these fields are not there. I clicked on the sql tab and then I'm lost. How do I load the sql file? How do I access this file?

 

OK, I've added the two fields that were missing in the customers table, but I'm still receiving a message after trying to create a new customer saying it can't find the "customers_paypal_ec" in the customers table?

 

I'm stumped at this point and really need help with this!

Link to comment
Share on other sites

check the sql file again or the instructions of the contribution. They should have notes of the sql table you need to modify. And also check the support thread for the contribution. If they do a mistake they usually post answers how to fix it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...