Jump to content

spiritquest

Members
  • Content count

    13
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Ketan
  1. spiritquest

    Batch Order Center Update 1.1

    For anyone having problems with this contribution not functioning on newer mySQL servers (the date search not finding results even when it should do), it is very simple to resolve. The query does not need to be altered much, you only need to add a blank space into the code and it functions. The answer has been partly fixed earlier in this thread: but the earlier solution altered the SQL query, where it did not need altering. The problem seems to be that the date format set for the <date to> field was incorrectly structured, which seemed to work in mysql 3.x but not in mysql 4.x After some testing of the query itself, if you make the following change to catalog/admin/batch_print.php on line 79: $orders_query = tep_db_query("select o.orders_id,h.comments,MIN(h.date_added) from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_STATUS_HISTORY . " h where o.date_purchased between '" . tep_db_input($startdate) . "' and '" . tep_db_input($enddate) . "23:59:59' and h.orders_id = o.orders_id" . $pull_w_status . $get_customer_comments . ' group by o.orders_id'); to this: $orders_query = tep_db_query("select o.orders_id,h.comments,MIN(h.date_added) from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_STATUS_HISTORY . " h where o.date_purchased between '" . tep_db_input($startdate) . "' and '" . tep_db_input($enddate) . " 23:59:59' and h.orders_id = o.orders_id" . $pull_w_status . $get_customer_comments . ' group by o.orders_id'); The only change is that a space has been inserted before 23:59:59 , this allows the query to run correctly. It must have been a bug in mysql 3.x that allowed it run .. I can't say. Make the above change and run the date search, it worked for me :)
  2. Yes this threw me as well .. I ended up backing up my original file and then replacing shopping_cart.php with the one in this contribution. The whole mod works, so great, ..... B U T ... The most recent security update to MS2 included an update to this very file. Could someone who's been active on the project update the contribution to include the // PWA comments in this file, as there are quite a few changes from the stock install on this file. Could someone also shed some light on whether we need to make changes to the shopping_cart.php file to bring the file into line with the most upto date version please .. I'm willing to help. Kind Regards, Ket
  3. I'm not sure this will work, I think you need to use this instead: $url = preg_replace('/&/','&',$url); However this problem is more complicated as the seo.class uses its own reference of the tep_href_link() . I tried all kinds of things, none which worked, as my biggest problem was on the Credit Card validation errors, generated from cc.php (this used the tep_redirect() function) which created an improper URL with & seperating all of the parameters. I eventually found a line in seo.class.php which when changed fixed the problem up. in seo.class.php line: 697, find the line with: return htmlspecialchars(utf8_encode($link)); and replace with: return preg_replace('/&/','&',htmlspecialchars(utf8_encode($link))); I did more before this, but I think this is the most pivotal area, as any URL that is not re-written using the class will use this function when redirected. The regualr expression preg_replace() may need to be used at key areas in other files if this alone doesn't fix the problem. All I know is that I've tried everyone elses suggestion and nothing has worked but this .. I used the access logs to check what my changes were doing at the Credit Card page (thats the only page I get these & errors) although I did see some errors on the login page too. Hope this helped someone.
×