Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with Order History and Order Status admin page


cinolas

Recommended Posts

Hello all,

 

I duplicated an existing osCommerce installation to create a second shopping cart (a third actually) on the same domain. I then manually trimmed the database to leave only a subset of the data (the products and product reviews mostly).

 

Most everything is fine except the user cannot view their Order history and the Admin can't see the Order list to change the order status.

 

At first I was getting the 1064 - You have an error in your SQL syntax error with this info:

 

SELECT o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text AS order_total, s.orders_status_name FROM orders o, orders_total ot, orders_status s WHERE o.customers_id = '33' AND o.orders_id = ot.orders_id AND ot.class = 'ot_total' AND o.orders_status = s.orders_status_id AND s.language_id = '1' ORDER BY orders_id DESC limit -10, 10

 

The problem being the -10 at the end.

 

I found some info here:

 

http://www.oscommerce.com/forums/lofiversion/i...hp?t149921.html

 

That seemed to point at a known osc bug:

 

http://svn.oscommerce.com/jira/secure/Dashboard.jspa

 

So I applied the proposed modifications but now when I go to the Order History page with my test user I see nothing and the pages go from 0 to -40 with navigation to go to those pages...

 

The Order list in the Admin module is empty...

 

I have a feeling that this a problem caused by a mismatch in the data in the DBs caused by improper trimming but I can't figure out what it could be. My SQL and PHP skills are borderline non-existent.

 

Thanks for your help,

 

nic

Link to comment
Share on other sites

chek mysql 5 patches.

 

- limit is not acceptable in mysql five.

 

there is a single line modifiation.

 

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

Thanks for the replies

 

BryceJr: Yes I can see the orders in the database.

 

Satish: you're saying that the "limit" parameter is not valid in MySQL 5 ?? Then I don't understand why they would use it in the osCommerce code ? I will look into the issue, thanks for the hint.

Link to comment
Share on other sites

Try and toggle the order_total.

 

Log in to your osc admin panel >>modules>>order total

 

Click subtotal >>remove

Click total>>remove

 

Click them again and install. Try to place a new order and see if new orders show.

Link to comment
Share on other sites

I mean the negetive limit was ok for Mysql 4 but not for Mysql 5.

 

oscommerce initial release were for Mysql 4.

 

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

Hmm if that was the case though I would have the same problem with the osCommerce installation that I made this duplicate from wouldn't I ?

 

This is only a problem in the duplicated and trimmed copy of the cart which is what leads me to believe that it's probably a mismatch in the data in the DBs because I trimmed it manually.

 

The other copies don't seem to send the -10 to start with.

 

I'm using osCommerce 2.2-MS2 on Apache/1.3.41 with MySQL 5.0.5 and PHP 4.4.9 (Zend: 1.3.0).

 

I mean the negetive limit was ok for Mysql 4 but not for Mysql 5.

 

oscommerce initial release were for Mysql 4.

 

Satish

Link to comment
Share on other sites

The other site might be running on Mysql 4.

 

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

The other site might be running on Mysql 4.

 

satish

 

 

No it's all on the same server, same domain even. Because of that I'm pretty certain at this point that the error is caused by a mismatch in the data in the database.

 

I'm not sure what that could be though...

 

Thanks for your help

 

nic

Link to comment
Share on other sites

No it's all on the same server, same domain even. Because of that I'm pretty certain at this point that the error is caused by a mismatch in the data in the database.

 

I'm not sure what that could be though...

 

Thanks for your help

 

nic

$this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page;

 

chek this on classes/split_page_results.php line 69 approx.

 

 

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

Archived

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

×
×
  • Create New...