Code Red Posted March 6, 2007 Posted March 6, 2007 I've been trying to run a copy of the file catalog/admin/customers.php in the front end of the site (catalog/customers.php) so it can be publically viewable, but I'm getting an SQL 1064 error. After a bit of head scratching I've isolated the problem to where it calls the splitPageResults function - looking at catalog/admin/includes/classes/split_page_results.php and catalog/includes/classes/split_page_results.php they seem to have been written by two different people - the code is very different and the order that the variables are passed to the function are different too. This is the line in customers.php - $customers_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $customers_query_raw, $customers_query_numrows); which matches with the function in catalog/admin/includes/classes/split_page_results.php - function splitPageResultsDealers(&$current_page_number, $max_rows_per_page, &$sql_query, &$query_num_rows) However, now that I've copied customers.php in the catalog/ folder, it's calling the function in catalog/includes/classes/split_page_results.php - function splitPageResults($query, $max_rows, $count_key = '*', $page_holder = 'page') It's obvious that &$sql_query is $query and $max_rows_per_page is $max_rows, but the other two are giving me trouble - I've tried changing around the variable order from the function call in customers.php but instead of the syntax error I just get a big blank. I even tried cheating, copying the admin version of split_page_results.php, renaming all the functions and calling that, but that didn't work either. Can anyone give me some help?
Jack_mcs Posted March 6, 2007 Posted March 6, 2007 See the latest oscommerce update package for a fix. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Code Red Posted March 6, 2007 Author Posted March 6, 2007 See the latest oscommerce update package for a fix. Jack Can I just copy the necessary files over or will it need a full re-install? I've quite heavily modified the site.
Jack_mcs Posted March 6, 2007 Posted March 6, 2007 For the split_page_results file, you can probably just copy them. But the fix is a minor change so if you are not sure, just edit the files. The instructions are in the package. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Code Red Posted March 6, 2007 Author Posted March 6, 2007 Thanks for the info. Is the latest package this one > oscommerce-2.2ms2-060817.zip?
Jack_mcs Posted March 6, 2007 Posted March 6, 2007 Yes. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Recommended Posts
Archived
This topic is now archived and is closed to further replies.