Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

need help with error message.


Recommended Posts

This is the error. I need this to run this weekend and I am not getting responses elsewhere.

 

Fatal error: Cannot redeclare class paypal_wpp in /var/www/vhosts/jeepcamping.com/httpdocs/store/includes/modules/payment/paypal_wpp.php on line 11

 

thanks for the help

Link to comment
Share on other sites

In your includes/modules/payment

there is one more file with class as paypal_wpp.

 

delete that file.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

I searched all the files one by one and could not find the one you spoke of. Yesterday I got a PM from dynamoeffects and he said "You copied the payment module into the language directory. Upload the language file found in the installation to the right place and it will fix itself."

 

I appologize for my ignorance with PHP. I am not a programmer. Any more advise would be great.

 

Allen

 

In your includes/modules/payment

there is one more file with class as paypal_wpp.

 

delete that file.

 

Satish

Link to comment
Share on other sites

I searched all the files one by one and could not find the one you spoke of. Yesterday I got a PM from dynamoeffects and he said "You copied the payment module into the language directory. Upload the language file found in the installation to the right place and it will fix itself."

 

I appologize for my ignorance with PHP. I am not a programmer. Any more advise would be great.

 

Allen

These modules have two files with the same name. One goes in includes\modules\payment the other goes in includes\languages\english\modules\payment

 

dynamoeffects was saying that you need to ensure that you copied the files to the correct locations.

Link to comment
Share on other sites

Thank you for the info Coopco. I went through and from the contribution uploaded the /includes/modules/payment/paypal_wpp.php to the corresponding file in the store. Then uploaded from the contribution /includes/languages/english/modules/payment/paypal_wpp.php to the corresponding location in the store. When I did that I checked the customers/orders function on the admin side of the store and recieved this error:

 

"Fatal error: Cannot redeclare class order in

/var/www/vhosts/jeepcamping.com/httpdocs/store/admin/includes/classes/order.php on line 13"

 

I guess I would have to go through the code and make the appropriate changes listed in the install info before this would function properly again. Just a guess. Confirmation required.

 

 

 

These modules have two files with the same name. One goes in includes\modules\payment the other goes in includes\languages\english\modules\payment

 

dynamoeffects was saying that you need to ensure that you copied the files to the correct locations.

Link to comment
Share on other sites

Thank you for the info Coopco. I went through and from the contribution uploaded the /includes/modules/payment/paypal_wpp.php to the corresponding file in the store. Then uploaded from the contribution /includes/languages/english/modules/payment/paypal_wpp.php to the corresponding location in the store. When I did that I checked the customers/orders function on the admin side of the store and recieved this error:

 

"Fatal error: Cannot redeclare class order in

/var/www/vhosts/jeepcamping.com/httpdocs/store/admin/includes/classes/order.php on line 13"

 

I guess I would have to go through the code and make the appropriate changes listed in the install info before this would function properly again. Just a guess. Confirmation required.

It looks like it is being declared twice, so check your edits as you suggested.

Link to comment
Share on other sites

It looks like it is being declared twice, so check your edits as you suggested.

 

 

Leslie,

 

Thank you for you help thus far. I went through all the edits and they seem to be ok. With the above error on order.php, I looked through the edits described and did not find any edit for the "store/admin/includes/classes/order.php." Below is the code for this file.

 

Thanks again for all your help.

 

Allen

 

 

<?php

/*

$Id: order.php,v 1.7 2003/06/20 16:23:08 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class order {

var $info, $totals, $products, $customer, $delivery;

 

function order($order_id) {

$this->info = array();

$this->totals = array();

$this->products = array();

$this->customer = array();

$this->delivery = array();

 

$this->query($order_id);

}

 

function query($order_id) {

$order_query = tep_db_query("select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");

$order = tep_db_fetch_array($order_query);

 

$totals_query = tep_db_query("select title, text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by sort_order");

while ($totals = tep_db_fetch_array($totals_query)) {

$this->totals[] = array('title' => $totals['title'],

'text' => $totals['text']);

}

 

$this->info = array('currency' => $order['currency'],

'currency_value' => $order['currency_value'],

'payment_method' => $order['payment_method'],

'cc_type' => $order['cc_type'],

'cc_owner' => $order['cc_owner'],

'cc_number' => $order['cc_number'],

'cc_expires' => $order['cc_expires'],

'date_purchased' => $order['date_purchased'],

'orders_status' => $order['orders_status'],

'last_modified' => $order['last_modified']);

 

$this->customer = array('name' => $order['customers_name'],

'company' => $order['customers_company'],

'street_address' => $order['customers_street_address'],

'suburb' => $order['customers_suburb'],

'city' => $order['customers_city'],

'postcode' => $order['customers_postcode'],

'state' => $order['customers_state'],

'country' => $order['customers_country'],

'format_id' => $order['customers_address_format_id'],

'telephone' => $order['customers_telephone'],

'email_address' => $order['customers_email_address']);

 

$this->delivery = array('name' => $order['delivery_name'],

'company' => $order['delivery_company'],

'street_address' => $order['delivery_street_address'],

'suburb' => $order['delivery_suburb'],

'city' => $order['delivery_city'],

'postcode' => $order['delivery_postcode'],

'state' => $order['delivery_state'],

'country' => $order['delivery_country'],

'format_id' => $order['delivery_address_format_id']);

 

$this->billing = array('name' => $order['billing_name'],

'company' => $order['billing_company'],

'street_address' => $order['billing_street_address'],

'suburb' => $order['billing_suburb'],

'city' => $order['billing_city'],

'postcode' => $order['billing_postcode'],

'state' => $order['billing_state'],

'country' => $order['billing_country'],

'format_id' => $order['billing_address_format_id']);

 

$index = 0;

$orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");

while ($orders_products = tep_db_fetch_array($orders_products_query)) {

$this->products[$index] = array('qty' => $orders_products['products_quantity'],

'name' => $orders_products['products_name'],

'model' => $orders_products['products_model'],

'tax' => $orders_products['products_tax'],

'price' => $orders_products['products_price'],

'final_price' => $orders_products['final_price']);

 

$subindex = 0;

$attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'");

if (tep_db_num_rows($attributes_query)) {

while ($attributes = tep_db_fetch_array($attributes_query)) {

$this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'],

'value' => $attributes['products_options_values'],

'prefix' => $attributes['price_prefix'],

'price' => $attributes['options_values_price']);

 

$subindex++;

}

}

$index++;

}

}

}

?>

Link to comment
Share on other sites

Leslie,

 

Thank you for you help thus far. I went through all the edits and they seem to be ok. With the above error on order.php, I looked through the edits described and did not find any edit for the "store/admin/includes/classes/order.php." Below is the code for this file.

 

Thanks again for all your help.

 

Allen

<?php

/*

$Id: order.php,v 1.7 2003/06/20 16:23:08 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class order {

var $info, $totals, $products, $customer, $delivery;

 

function order($order_id) {

$this->info = array();

$this->totals = array();

$this->products = array();

$this->customer = array();

$this->delivery = array();

 

$this->query($order_id);

}

 

function query($order_id) {

$order_query = tep_db_query("select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");

$order = tep_db_fetch_array($order_query);

 

$totals_query = tep_db_query("select title, text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by sort_order");

while ($totals = tep_db_fetch_array($totals_query)) {

$this->totals[] = array('title' => $totals['title'],

'text' => $totals['text']);

}

 

$this->info = array('currency' => $order['currency'],

'currency_value' => $order['currency_value'],

'payment_method' => $order['payment_method'],

'cc_type' => $order['cc_type'],

'cc_owner' => $order['cc_owner'],

'cc_number' => $order['cc_number'],

'cc_expires' => $order['cc_expires'],

'date_purchased' => $order['date_purchased'],

'orders_status' => $order['orders_status'],

'last_modified' => $order['last_modified']);

 

$this->customer = array('name' => $order['customers_name'],

'company' => $order['customers_company'],

'street_address' => $order['customers_street_address'],

'suburb' => $order['customers_suburb'],

'city' => $order['customers_city'],

'postcode' => $order['customers_postcode'],

'state' => $order['customers_state'],

'country' => $order['customers_country'],

'format_id' => $order['customers_address_format_id'],

'telephone' => $order['customers_telephone'],

'email_address' => $order['customers_email_address']);

 

$this->delivery = array('name' => $order['delivery_name'],

'company' => $order['delivery_company'],

'street_address' => $order['delivery_street_address'],

'suburb' => $order['delivery_suburb'],

'city' => $order['delivery_city'],

'postcode' => $order['delivery_postcode'],

'state' => $order['delivery_state'],

'country' => $order['delivery_country'],

'format_id' => $order['delivery_address_format_id']);

 

$this->billing = array('name' => $order['billing_name'],

'company' => $order['billing_company'],

'street_address' => $order['billing_street_address'],

'suburb' => $order['billing_suburb'],

'city' => $order['billing_city'],

'postcode' => $order['billing_postcode'],

'state' => $order['billing_state'],

'country' => $order['billing_country'],

'format_id' => $order['billing_address_format_id']);

 

$index = 0;

$orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");

while ($orders_products = tep_db_fetch_array($orders_products_query)) {

$this->products[$index] = array('qty' => $orders_products['products_quantity'],

'name' => $orders_products['products_name'],

'model' => $orders_products['products_model'],

'tax' => $orders_products['products_tax'],

'price' => $orders_products['products_price'],

'final_price' => $orders_products['final_price']);

 

$subindex = 0;

$attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'");

if (tep_db_num_rows($attributes_query)) {

while ($attributes = tep_db_fetch_array($attributes_query)) {

$this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'],

'value' => $attributes['products_options_values'],

'prefix' => $attributes['price_prefix'],

'price' => $attributes['options_values_price']);

 

$subindex++;

}

}

$index++;

}

}

}

?>

My guess is that the declaration is in another file that is called earlier in the process. I would be checking the edits in the other files for the same declaration.

Link to comment
Share on other sites

My guess is that the declaration is in another file that is called earlier in the process. I would be checking the edits in the other files for the same declaration.

 

Thanks for the info. This is way over my head. I understand the concept of "called earlier in the process," but I have no idea on how to look for that. Or to change it if I found it so I wouldn't screw something up.

 

Thank you again. I will try and find someone that can work on this locally.

Link to comment
Share on other sites

Thanks for the info. This is way over my head. I understand the concept of "called earlier in the process," but I have no idea on how to look for that. Or to change it if I found it so I wouldn't screw something up.

 

Thank you again. I will try and find someone that can work on this locally.

The declaration would have to have been made in an edited file, a new file that was part of the contribution, or a file uploaded to the wrong location.

Link to comment
Share on other sites

The declaration would have to have been made in an edited file, a new file that was part of the contribution, or a file uploaded to the wrong location.

 

 

Is there a typical list of what files are placed where and what sizes I could expect them to be? I feel that what has happened was as you and others have said. There has been a file misplaced somewhere.

 

Thanks! Any info I come up with I will post. Hopefully that will be a resolution.

Link to comment
Share on other sites

Is there a typical list of what files are placed where and what sizes I could expect them to be? I feel that what has happened was as you and others have said. There has been a file misplaced somewhere.

 

Thanks! Any info I come up with I will post. Hopefully that will be a resolution.

Not that I know of. I have downloaded the zip file for osc and decompressed it to my pc. I don't touch it and use it for reference.

Link to comment
Share on other sites

Not that I know of. I have downloaded the zip file for osc and decompressed it to my pc. I don't touch it and use it for reference.

 

 

OK. Progress. I have most of the orders page back rendering. Now I get this error:

 

Fatal error: Call to undefined function: tep_hide_session_id() in /var/www/vhosts/jeepcamping.com/httpdocs/store/admin/orders.php on line 363

 

here is the code in the area:

 

 

 

<?php echo tep_hide_session_id(); ?></form></tr>

<tr><?php echo tep_draw_form('status', FILENAME_ORDERS, '', 'get'); ?>

<td class="smallText" align="right"><?php echo HEADING_TITLE_STATUS . ' ' . tep_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), '', 'onChange="this.form.submit();"'); ?></td>

<?php echo tep_hide_session_id(); ?></form></tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="dataTableHeadingRow">

<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>

<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td>

<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td>

<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>

<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>

</tr>

<?php

if (isset($HTTP_GET_VARS['cID'])) {

$cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);

$orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC";

} elseif (isset($HTTP_GET_VARS['status']) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) {

$status = tep_db_prepare_input($HTTP_GET_VARS['status']);

$orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by o.orders_id DESC";

} else {

$orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by o.orders_id DESC";

}

$orders_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows);

$orders_query = tep_db_query($orders_query_raw);

while ($orders = tep_db_fetch_array($orders_query)) {

if ((!isset($HTTP_GET_VARS['oID']) || (isset($HTTP_GET_VARS['oID']) && ($HTTP_GET_VARS['oID'] == $orders['orders_id']))) && !isset($oInfo)) {

$oInfo = new objectInfo($orders);

}

 

if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) {

echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '\'">' . "\n";

} else {

echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '\'">' . "\n";

}

?>

 

 

 

See anything that jumps out at you. The top line is 363 and goes to 404. I see the same line down on line 366. Is this supposed to be there. Can I delete it.

 

Getting somewhere at least.

Link to comment
Share on other sites

sounds like you may have changed your general.php file, in includes/functions thus you may want to copy the file back up, else if you made changes double check them. look at your backup file and see the size difference.

 

checked it out and they are the same size.

Link to comment
Share on other sites

OK. Progress. I have most of the orders page back rendering. Now I get this error:

 

Fatal error: Call to undefined function: tep_hide_session_id() in /var/www/vhosts/jeepcamping.com/httpdocs/store/admin/orders.php on line 363

 

See anything that jumps out at you. The top line is 363 and goes to 404. I see the same line down on line 366. Is this supposed to be there. Can I delete it.

 

Getting somewhere at least.

The code looks normal, so don't delete anything. The session_id appears in a number of files. What were you doing when the error arose?

Link to comment
Share on other sites

The code looks normal, so don't delete anything. The session_id appears in a number of files. What were you doing when the error arose?

 

 

I had someone install the PayPal_WPP_1.0.1 module and configure it. I then went to look at customers orders and started getting errors. I requested this person to resolve the (4) errors I received. He removed three of them. Thus when It started this thread.

 

Here is a update. I renamed the existing version of the file. I then just removed "<?php echo tep_hide_session_id(); ?></form></tr> from both lines 363 and 366 and uploaded the edited file. Viola! I can now see the customer orders. I will now test it with an order and see if there is any issues.

 

Final resolution pending. I will post back. Thank you for all the help for the newbie. :D

Link to comment
Share on other sites

I had someone install the PayPal_WPP_1.0.1 module and configure it. I then went to look at customers orders and started getting errors. I requested this person to resolve the (4) errors I received. He removed three of them. Thus when It started this thread.

 

Here is a update. I renamed the existing version of the file. I then just removed "<?php echo tep_hide_session_id(); ?></form></tr> from both lines 363 and 366 and uploaded the edited file. Viola! I can now see the customer orders. I will now test it with an order and see if there is any issues.

 

Final resolution pending. I will post back. Thank you for all the help for the newbie. :D

Not sure if that solution will affect other payment modules (assuming the problem is with the addon you said). You can email me the two addon files if you like (address in my profile).

Link to comment
Share on other sites

Well that didn't work completely. I can see the new orders that I create but I cannot delete them. I get order does not exist errors. When I go the edit the order I recieve the following.

 

 

1146 - Table 'mysql290e014888a268512e053fd3909.orders_status_history_transactions' doesn't exist

 

SELECT transaction_id, transaction_type, payment_type, payment_status, module_code, transaction_avs, transaction_cvv2, transaction_msgs FROM orders_status_history_transactions WHERE orders_status_history_id = 12 LIMIT 1

 

[TEP STOP]

 

If this is not an easy fix I will just delete the edited orders file and rename the old one back to the original. Back to square then.

Link to comment
Share on other sites

Well that didn't work completely. I can see the new orders that I create but I cannot delete them. I get order does not exist errors. When I go the edit the order I recieve the following.

1146 - Table 'mysql290e014888a268512e053fd3909.orders_status_history_transactions' doesn't exist

 

SELECT transaction_id, transaction_type, payment_type, payment_status, module_code, transaction_avs, transaction_cvv2, transaction_msgs FROM orders_status_history_transactions WHERE orders_status_history_id = 12 LIMIT 1

 

[TEP STOP]

 

If this is not an easy fix I will just delete the edited orders file and rename the old one back to the original. Back to square then.

 

 

 

OK the above error no longer exists, however, when I go to the customers/orders in the admin and click on orders I can see the orders, including the new test ones but I can't delete them. I get an error message at the top of the page that states "Error: Order does not exist." all in default error color of salmon or pink or whatever.

Link to comment
Share on other sites

The image is in your admin and can't be viewed.

 

You maybe able to delete the order by using phpmyadmin to delete individual orders (very carefully and after you have backed up the database).

Link to comment
Share on other sites

The image is in your admin and can't be viewed.

 

You maybe able to delete the order by using phpmyadmin to delete individual orders (very carefully and after you have backed up the database).

 

 

Thanks! I have backed up the database and will continue to do so. All the changes I have made are only after I make failsafe copies of files to revesre any ill effects I may cause.

 

While I have you, and I thank you for all your help and patients, how can I config the store to ship multiple packages for one item. More importantly, set up shipping for said packages at an accurate cost. See thread here http://www.oscommerce.com/forums/index.php?showtopic=297767

 

If your not interested, I understand. Thank you so much again for your help!

Link to comment
Share on other sites

I don't wish to be unkind, but you are clearly not up to installing advanced contributions such as Pay Pal Website Payments Pro.

 

I think it's time you called it a day or else paid someone to professionally install these contributions for you.

 

Just because osCommerce is free to anyone to use it does not mean that anyone CAN use it, especially when it comes to installing more advanced contributions.

 

Vger

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...