Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

account_history.php( fix )


cigcode

Recommended Posts

I know there are a few users here who are having problems with account_history disply, well after a few hours of reading and searching i finaly figured it out.. in

account_history.php change

 

$history_query_raw = 
  "select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text    as osc_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 . "' order by o.orders_id DESC";

 

to...

 

$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_gv' 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";

 

Please let me know if it did or did not work.. cause i might help you save the same damn headache i hade and still have

Link to comment
Share on other sites

This does not work for me.

 

1. There are no entries in my order_total table where ot.class = 'ot_gv'. I do have entries where ot.class = 'ot_total'.

 

2. On my installations, the table order_status is completely empty. These criteria in the WHERE part of the query yield 0 records:

 

o.orders_status = s.orders_status_id

s.language_id = '" . (int)$languages_id . "'

 

On your installation, is the table order_status empty?

Link to comment
Share on other sites

I refilled my order_status table with

 

INSERT INTO orders_status VALUES (1, 1, 'Pending');

INSERT INTO orders_status VALUES (2, 1, 'Processing');

INSERT INTO orders_status VALUES (3, 1, 'Delivered');

 

and everything works perfectly now.

Link to comment
Share on other sites

  • 2 weeks later...

Archived

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

×
×
  • Create New...