Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

account_history error please help


mcoski

Recommended Posts

Fatal error: Call to undefined function: tep_count_customer_orders() in /home/txcpu/public_html/shop/account_history.php on line 62

 

Is the error i get when trying to view my account order history (test account).

 

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td>

<?php

$orders_total = tep_count_customer_orders();

 

if ($orders_total > 0) {

$history_query_raw = "select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and o.orders_status != '99999' order by orders_id DESC"; $history_query_raw = "select o.orders_id, o.date_purchased, o.delivery_name, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) left join " . TABLE_ORDERS_STATUS . " s on (o.orders_status = s.orders_status_id and s.language_id = '" . $languages_id . "') where o.customers_id = '" . $customer_id . "' and ot.class = 'ot_total' order by orders_id DESC";

$history_split = new splitPageResults($history_query_raw, MAX_DISPLAY_ORDER_HISTORY);

$history_query = tep_db_query($history_split->sql_query);

 

while ($history = tep_db_fetch_array($history_query)) {

$products_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$history['orders_id'] . "'");

$products = tep_db_fetch_array($products_query);

 

Those are lines 57 - 74

 

Here is 62:

<tr>

 

Here is 65:

$orders_total = tep_count_customer_orders();

 

I have no idea why it would be doing this? I installed paypal IPN if that makes a difference but I dont think it changed account_history.php

 

Thanks!

Link to comment
Share on other sites

tep_count_customer_orders is defined in includes/functions/general.php. Did you make any changes to that file? Maybe there is a parse error that prevents the file from being included.

 

Hth,

Matt

Link to comment
Share on other sites

I just checked my general.php and even created a new oscommerce to see its general.php and there is no 'tep_count_customer_orders();

' that I can see. Is it defined elsewhere? I know there is no parse error though.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...