Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order Tracker New Contrib....


jello1
 Share

Recommended Posts

  • 5 months later...
  • Replies 260
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 year later...

Installed this on 2.3.1 and I am getting this error

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rib ' and date_purchased >= '2011-1-01 00:00:00' and date_purchased <= '2011-12-' at line 1

select count(*) as count from orders where customers_state = 'Ma'rib ' and date_purchased >= '2011-1-01 00:00:00' and date_purchased <= '2011-12-31 11:59:59' 

Link to comment
Share on other sites

Hi,

 

I had the same problem.

The problem is around the customers_state, if u have some states with 1 quote, the sql request sux.

You need to add addslashes function for the variable $customers_location['zone_name'].

 

 

In the file order_tracking.php line 1028

 

Change :

 

    $location_pending_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS . " where customers_state = '". $customers_location['zone_name'] ." ' and date_purchased >= '$year-$startmonth-01 00:00:00' and date_purchased <= '$year-$endmonth-31 11:59:59' ");

 

 

With :

 

  $location_pending_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS . " where customers_state = '". addslashes($customers_location['zone_name']) ." ' and date_purchased >= '$year-$startmonth-01 00:00:00' and date_purchased <= '$year-$endmonth-31 11:59:59' ");

 

Godd luck

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

I'm trying to get the Orders by Zone file to order by count (number of orders) but whatever I try doesnt work.

 

I've tried adding ORDER BY count DESC to the query but no luck. I cant see why it wouldnt work.

 

$location_pending_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS . " where customers_state = '". $customers_location['zone_name'] ." ' and date_purchased >= '$year-$startmonth-01 00:00:00' and date_purchased <= '$year-$endmonth-31 11:59:59' ORDER BY count DESC");

 

any ideas?

 

Thanks

 

Dave

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

 

I installed the contrib on 2.3.1 and it seems it is working flawless (hope it will ^_^ ), but since I use it for zones other than US, I get some "xxx" and the end of the ZIP codes. In Italy we got 5 digits for ZIP so I wonder if it is possible to have the code fully shown, since it is a major requirement for me to know what I ship to specific ZIPs.

 

Thank you.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

Hi is this forum still active as installed the add on and love but just want to change the date format under sales summary from mm-dd to dd-mm

 

Any ideas any one

 

Thank you

 

Ian

Link to comment
Share on other sites

  • 5 years later...

hello I have follow all the instructions, but I get this error:

Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\xampp\htdocs\oscommerce-2.3.3.4\catalog\admin\orders_tracking.php on line 193

Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\oscommerce-2.3.3.4\catalog\admin\orders_tracking.php on line 193

Warning: mysql_query(): A link to the server could not be established in C:\xampp\htdocs\oscommerce-2.3.3.4\catalog\admin\orders_tracking.php on line 193
Query failed : Access denied for user ''@'localhost' (using password: NO)      Help me please.  thanks

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...