Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

jQuery/Ajax Advanced Order Handler for osCommerce 2.3.3


Recommended Posts

@@Dr. Rolex  I've got to hand it to you  :thumbsup:   - you sure as hell did one heck of a job on this module - it is fantastic. I love it. Its been a while since I've seen such a wonderful module that works well and that is also so visually appealing. 

 

Glad to hear that you found it useful, makes me a happy boy. ;)

 

Next revision is more or less ready, I have tested it in production for like two weeks and I guess there's still a couple of bugs to fix but it should be good enough to release soon.

 

  • Biggest improvements done during the last weeks is fixing multiple order editing; it's now possible to edit multiple orders simultaneously.

  • I have also added some simple statistics with amCharts, the idea is to work on this more further on when I have figured out what statistics that could be useful.

  • It's now possible to mail the customer directly from the order handler.

  • The order handler now uses the PHPMailer class for email, making updating orders really fast. Updating 100 orders with both updating status and sending email via external SMTP server is done almost in an instant, at least for me this was pretty slow before with PHPs mail(). I plan to make this optional with a toggle switch in the configuration, I'll see if I got time to fix this before release..

  • jTable uses cookies to save the column settings (yes, the columns are resizable and also togglable - see attached image) and row limit so I have expanded on this so that sorting options and configuration options will be saved to cookies as well.

  • For those that like to work in a Print-And-Go type of workflow  :rolleyes: , I have added an option that will immediately open the print dialog when invoices have finished loading and also close the new tab/window as soon as print dialog is closed on Print/Cancel. This will help to reduce 'risk' of opening a lot of tabs/windows which I have found some less experienced computer hackers to have trouble to handle.

  • The display of the Header as well as the Admin Menu is now both togglable.

  • Option to remove updated orders from the list or just update the status but keep them on the table have been added.

  • Overlay of Dialogs is also togglable, so that you can work with the fields below the dialog when dialog is displayed.

  • I have added some benchmarking functionality which will give you the proper load time for the table both in console and as notification.

  • I was planning on removing the old 'Edit Order' page altogether since it was a pain to get it compatible but eventually I calmed down and now it should work as expected. There's an option that you can select to make the 'Edit Order' page open in a new tab/window.

  • Some of the SQL Statements have been optimized, I worked a lot with the 'Big One', the one that gets all orders for the table, tried a lot of different approaches, but as it is now it will not risk missing any orders (I hope) and is quite fast. Loading 50 orders without cache and with server on localhost the request took around 40 ms to finish and it took around 2.5 seconds in total for the jTable to parse the JSON and create the table.

     

    So any performance work that is worth doing should probably be done on the client code, meaning the javascript/jQuery as the server parses all operations pretty fast.

     

    Some examples:

    Deleting 50 orders took 40 ms for the request and around 400 ms for client to finish.

    Updating 50 orders status with sending email from remote SMTP server takes anything from 1 seconds to 20 seconds in total, depending on the day.

    Updating 50 orders status without sending email took around 1 s.

 

Screenshots attached.

Link to comment
Share on other sites

 

Not sure if anyone else has picked up this bug but  get error message when creating a new order

Parse error: syntax error, unexpected '[' in /home/xxx/public_html/xxx/xxxxx/create_order_process.php on line 56

 Line 56 and line 61 have errors

$payment_method = $payment_modules->selection()[0]['module'];

// load the selected shipping module
  require(DIR_WS_CLASSES . 'shipping.php');
  $shipping_modules = new shipping($shipping_method);
  $shipping_cost = $shipping_modules->quote($shipping_method)[0]['methods'][0]['cost'];

 

Apparently, older versions of PHP don't like returning [key] values when put after object property. Something like that is the problem anyway, try with replacing this:

// load selected payment module
  $dir = getcwd();
  chdir("../");
  require(DIR_WS_CLASSES . 'payment.php');
  $payment_modules = new payment($payment_method);
  $payment_method = $payment_modules->selection()[0]['module'];

// load the selected shipping module
  require(DIR_WS_CLASSES . 'shipping.php');
  $shipping_modules = new shipping($shipping_method);
  $shipping_cost = $shipping_modules->quote($shipping_method)[0]['methods'][0]['cost'];

With this:

// load selected payment module
  $dir = getcwd();
  chdir("../");
  require(DIR_WS_CLASSES . 'payment.php');
  $payment_modules = new payment($payment_method);
  $payment_method = $payment_modules->selection();
  $payment_method = $payment_method[0]['module'];

// load the selected shipping module
  require(DIR_WS_CLASSES . 'shipping.php');
  $shipping_modules = new shipping($shipping_method);
  $shipping_cost = $shipping_modules->quote($shipping_method);
  $shipping_cost = $shipping_cost[0]['methods'][0]['cost'];

Report back if it didn't work. I have a better solution for loading the modules now, but I haven't updated the create_order.php code since new orders will be created directly in the order handler in next revision.

 

So create_order.php will not be included in the next package I upload.

Link to comment
Share on other sites

Depending on how hungover I will be tomorrow and on Sunday, if possible I will put together the instructions and release the next "update" for this Add-on this weekend.

 

I finally found and fixed the bottleneck that made the table load so slow, the culprit was the bootstrap.tooltip().

 

I have implemented the qTip2 jQuery add-on instead and only used the bootstrap.tooltip() on action columns. I recommend to disable tooltips as soon as the user have understood the actions  from the buttons.

 

Loading 250 Orders / Rows / Records on Remote Production Server

 

Firefox

NO tooltip:       2.3 s
WITH tooltip:   2.9 s

 

Chrome

NO tooltip:       1.9 s
WITH tooltip:   2.5 s

 

Unfortunately, most browsers no longer support the "hack" that made CSS3  hardware accelerated using the GPU. :(

Using the spinning class on the little cog wheel for the Ajax Polling Button easily turns up CPU from 10% to 40%+, so I have to replace it with an animated gif or something.. Quite disappointing, it would be great to find an explanation to why the browser dev's took the decision to disable this feature/hack and what need to be don instead to get the damn cog spinning...

 

Well, anyway, handling orders should be fast enough for any human to be satisfied now. I have used this system a couple of weeks now and I don't really spend any time at all on handling orders.

It's  a very streamlined process now, regardless of what needs to be done with the order(s).

 

Page breaks for invoices should be displayed correctly in both Chrome and Firefox now.

 

I planned to add customizable  key bindings for the available actions, but enough is enough. This Add-On currently have somewhere between 5 and 10.000 lines of custom made code now. :x

Link to comment
Share on other sites

  • 2 weeks later...

Im using your contrib. and exept for one db issue its working fine.

I´ve altered create order.php to make it work but the problem existed before and shouldn´t have anything to do with that file anyway.

 

When i add some products to an existing order the text field with tax will not update correct.

I´m having some problems putting my finger on the issue since it doesn´t happen with all products, only some  :wacko:

 

When the problem occurs the ot_tax field in the DB is updated with a low number, usually 1 - 4 nomatter how big the total price of the order is.

Link to comment
Share on other sites

I´ve located the problem.

As soon as the ot_tax sum gets higher than 999,99 it prints 1 instead of 1000

 

That was indeed a strange error.

 

If you check the order_total table in your database, I'm pretty sure that the value column shows the correct number but the text column does not?

This sounds like a formatting error and should be an easy fix, perhaps you've already solved it?

 

Actually, I noticed that this bug still exist in the new revision, too bad I already uploaded the damn files.

 

To fix it (in Revision 3), find this code in ./admin/includes/modules/order_handler/ajax_update.php around line 239

            $texto = number_format( (float)$taxes[$i]['value'], 2 );
            $new_text = $currencies->format( $texto, true, $currency[0]['currency'], $currency[0]['currency_value'] );

Replace with:

            $new_text = $currencies->format( $taxes[$i]['value'], true, $currency[0]['currency'], $currency[0]['currency_value'] );

The same fix should work for Revision 2, find this code in ./admin/orders_ajax.php around line 91

            $texto = number_format((float)$taxes[$i]['value'], 2);
            $new_text = $currencies->format($texto);

Replace With:

            $new_text = $currencies->format($taxes[$i]['value']);

I haven't tried the fix for Rev2, so make sure to test it properly.

Edited by Dr. Rolex
Link to comment
Share on other sites

jQuery/Ajax Advanced Order Handler Rev3

 

Download Add-On here: http://addons.oscommerce.com/info/9055

 

I was told that, apparently, "Everybody uses xz now" to compress files and it should be supported by most OS, so instead of waiting for the people upstairs to approve the old files, I uploaded a new gzipped archive containing another xz archive with the Add-On inside.

 

I also fixed the bug that Flaggi mentioned.

 

Here's an index that might speed up the main order query a bit if you have a lot of orders. It only works if a Sort by Status is selected. To add it, simply run this query on your database.

ALTER TABLE `orders` ADD INDEX `idx_orders_orders_status` USING BTREE (orders_status)
Link to comment
Share on other sites

If Order Comments aren't displayed properly, replace this SQL query in ./admin/includes/modules/order_handler/ajax_update.php

    $orders_query_raw = "SELECT o.orders_id, o.customers_id, o.customers_name, o.customers_company, o.delivery_street_address, o.delivery_suburb, o.delivery_city, o.delivery_postcode, o.delivery_state, o.delivery_country, o.customers_telephone, o.customers_email_address, o.date_purchased, o.orders_status, o.payment_method, MIN(osh.comments) as comments, ot.text AS order_total, (SELECT orders_status_name FROM orders_status WHERE orders_status_id = o.orders_status AND language_id = ?) as orders_status_name, (SELECT SUM(products_quantity) FROM orders_products WHERE orders_id = o.orders_id GROUP BY orders_id) as products_quantity FROM orders o JOIN orders_status_history osh USING (orders_id) JOIN orders_total ot USING (orders_id) WHERE ot.class = 'ot_total' $status $specific GROUP BY orders_id ORDER BY $order_by $page_limit";

With This:

    $orders_query_raw = "SELECT o.orders_id, o.customers_id, o.customers_name, o.customers_company, o.delivery_street_address, o.delivery_suburb, o.delivery_city, o.delivery_postcode, o.delivery_state, o.delivery_country, o.customers_telephone, o.customers_email_address, o.date_purchased, o.orders_status, o.payment_method, MAX(osh.comments) as comments, ot.text AS order_total, (SELECT orders_status_name FROM orders_status WHERE orders_status_id = o.orders_status AND language_id = ?) as orders_status_name, (SELECT SUM(products_quantity) FROM orders_products WHERE orders_id = o.orders_id GROUP BY orders_id) as products_quantity FROM orders o JOIN orders_status_history osh USING (orders_id) JOIN orders_total ot USING (orders_id) WHERE ot.class = 'ot_total' $status $specific GROUP BY orders_id ORDER BY $order_by $page_limit";
Link to comment
Share on other sites

I have managed to solve the 'mail merging' chaos coming from exporting address labels to envelopes.

 

Instead of doing it 'that way' I have played with the FPDF Library PDF Generator to automatically create envelopes of any size and have come up with a pretty simple & good solution to do this.

 

Supported (..but not limited to..) Envelopes Sizes

 

International standard sizes

 

Format    Dimensions (HxW mm)    Dimensions (in)    Suitable for content
DL    110 × 220    4.33 x 8.66    1/3 A4    DL    110 × 220    4.33 x 8.66
C7    81 x 114    3.2 x 4.5    A7 (or A6 folded in half)    C7    81 x 114    3.2 x 4.5
C7/C6    81 x 162    3.19 x 6.4    1/3 A5    C7/C6    81 x 162    3.19 x 6.4
C6    114 × 162    4.5 x 6.4    A6 (or A4 folded in half twice)    C6    114 × 162    4.5 x 6.4
C6/C5    114 × 229    4.5 x 9    1/3 A4    C6/C5    114 × 229    4.5 x 9
C5    162 × 229    6.4 x 9    A5 (or A4 folded in half once)    C5    162 × 229    6.4 x 9
C4    229 × 324    9.0 x 12.8    A4    C4    229 × 324    9.0 x 12.8
C3    324 × 458    12.8 x 18    A3    C3    324 × 458    12.8 x 18
B6    125 × 176    4.9 x 6.9    C6    B6    125 × 176    4.9 x 6.9
B5    176 × 250    6.9 x 9.8    C5    B5    176 × 250    6.9 x 9.8
B4    250 × 353    9.8 x 13.9    C4    B4    250 × 353    9.8 x 13.9
E4    280 × 400    11 x 15.75    B4    E4    280 × 400    11 x 15.75

 

North American sizes

Format    Dimensions (in)    Dimensions (mm)    Ratio    Format    Dimensions (in)    Dimensions (mm)
A2    4⅜ × 5¾    111.1 × 146.1    132 %    A2    4⅜ × 5¾    111.1 × 146.1
A6    4¾ × 6½    120.7 × 165.1    137 %    A6    4¾ × 6½    120.7 × 165.1
A7    5¼ × 7¼    133.4 × 184.2    138 %    A7    5¼ × 7¼    133.4 × 184.2
A8    5½ × 8⅛    139.7 × 206.4    148 %    A8    5½ × 8⅛    139.7 × 206.4
A9    5¾ × 8¾    146.1 × 222.3    152 %    A9    5¾ × 8¾    146.1 × 222.3
A10    6 × 9½    152.4 × 241.3    158 %    A10    6 × 9½    152.4 × 241.3
No. 6¾    3⅝ × 6½    92.1 × 165.1    179 %    No. 6¾    3⅝ × 6½    92.1 × 165.1
No. 7¾ (Monarch)    3⅞ × 7½    98.4 × 190.5    194 %    No. 7¾ (Monarch)    3⅞ × 7½    98.4 × 190.5
No. 9    3⅞ × 8⅞    98.4 × 225.4    229 %    No. 9    3⅞ × 8⅞    98.4 × 225.4
No. 10    4⅛ × 9½    104.8 × 241.3    230 %    No. 10    4⅛ × 9½    104.8 × 241.3
No. 11    4½ × 10⅜    114.3 × 263.5    231 %    No. 11    4½ × 10⅜    114.3 × 263.5
No. 12    4¾ × 11    120.7 × 279.4    232 %    No. 12    4¾ × 11    120.7 × 279.4
No. 14    5 × 11½    127.0 × 292.1    230 %    No. 14    5 × 11½    127.0 × 292.1
A2    4⅜ × 5¾    111.1 × 146.1    132 %    A2    4⅜ × 5¾    111.1 × 146.1
A6    4¾ × 6½    120.7 × 165.1    137 %    A6    4¾ × 6½    120.7 × 165.1
A7    5¼ × 7¼    133.4 × 184.2    138 %    A7    5¼ × 7¼    133.4 × 184.2
A8    5½ × 8⅛    139.7 × 206.4    148 %    A8    5½ × 8⅛    139.7 × 206.4
A9    5¾ × 8¾    146.1 × 222.3    152 %    A9    5¾ × 8¾    146.1 × 222.3

 

Sorry for the messy layout, but it wouldn't take the original table layout which you can find here.

 

 

I have added a slot for an image, meant for perhaps your national 'postage prepaid' stamp or similar. I have also added support for two-sided/duplex printing, for those of you that are lucky enough to own such a piece of luxurious printing machinery. :thumbsup:

 

Anyway, this obviously removes a step or two in the envelope management process and also drops the requirements of a potentially expensive spreadsheet application.

If I have time for it (..and of course if I'll feel like it..) then the module will be uploaded tomorrow :x .

Edited by Dr. Rolex
Link to comment
Share on other sites

jQuery/Ajax Advanced Order Handler Rev3 - Envelope Module

 

Download Module here: http://addons.oscommerce.com/info/9055

 

This module requires jQuery/Ajax Advanced Order Handler Rev3 to be installed first.

The envelope module will enable the feature to create envelopes from the order handler directly as a PDF. All International standard sizes and North American sizes found on Wikipedia supported.
https://en.wikipedia.org/wiki/Envelope#International_standard_sizes

Adding more envelope sizes is as simple as adding an additional option with height x width. Ask if you can't figure out how to do it yourself.

Envelopes are UTF-8 encoded.

As a bonus the prepared statements in order_prepared.php have been optimized which gives a performance boost when creating invoices, CSV and envelopes.

Link to comment
Share on other sites

 

I have installed jQuery/Ajax Advanced Order Handler for osCommerce 2.3.3 in my website. It shows empty page. I think some of files missing from download attachment. Please help me.

 

I have installed the Add-On on both a fresh installation of osCommerce 2.3.3.4 and osCommerce 2.3.4 without any errors so there's no files missing.

 

Are you getting a completely blank page or can you see the Admin Menu and the Header?

 

You can try to change this code in ./admin/get_table.php around line 244

          oHandler.init();

          $( window ).load(function( event ){

With This:


          $( window ).load(function( event ){
            oHandler.init();

Also, if this didn't do anything, check your PHP error log and Chrome Console for errors.

 

Shortcut to opening the Console in Chrome:

On Windows: Ctrl + Shift + J

On Mac: Cmd + Opt + J

 

 

Link to comment
Share on other sites

Hi Dr. Rolex,

 

I'm using PHP Version: 5.4.30 and osCommerce 2.3.3.4 

 

I have installed jQuery Advanced Order Handler 2.3.3 Rev3 in my website.
Installed MySQL Native Driver (mysqlnd) also in my server.
The order handler check(order_handler_check.php) is also passed.
I'm getting a blank page in get_table.php, 
 
SO I updated the plugin with "jQuery Advanced Order Handler 2.3.3 Rev3 Envelope Module_1".
Still I am getting the same blank page.
 
(1) Changed the code in ./admin/includes/application_top.php
From
       error_reporting(E_ALL & ~E_NOTICE);
To
       error_reporting(E_ALL);
       ini_set('display_errors', '1');
 
The following are error messages in 
 
: Undefined index: Catalog in /home/public_html/admin/includes/column_left.php
: Undefined index: Configuration in on line 78
: Undefined index: Customers in /home/public_html/admin/includes/column_left.php
: Undefined index: Latex Mattress in on line 78
: Undefined index: Localization in /home/public_html/admin/includes/column_left.php
: Undefined index: Locations / Taxes in on line 78
: Undefined index: Modules in /home/public_html/admin/includes/column_left.php
: Undefined index: Orders in on line 78
: Undefined index: Reports in /home/public_html/admin/includes/column_left.php
: Undefined index: Tools in on line 78
 
 
(2) Changed the code in ./admin/get_table.php
From
        oHandler.init();
        $( window ).load(function( event ){
To
        $( window ).load(function( event ){
        oHandler.init();
 
(3) The following are messages in error_log
 
[25-Jul-2014 09:31:50 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[25-Jul-2014 09:31:50 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[25-Jul-2014 04:31:50 America/Chicago] PHP Fatal error:  Call to undefined function tep_db_fetch_all() in /home/xxxxxxx/public_html/admin/includes/modules/order_handler/modals.php on line 108
 
Please help me.
Link to comment
Share on other sites

 

Hi Dr. Rolex,

 

I'm using PHP Version: 5.4.30 and osCommerce 2.3.3.4 

 

I have installed jQuery Advanced Order Handler 2.3.3 Rev3 in my website.
Installed MySQL Native Driver (mysqlnd) also in my server.
The order handler check(order_handler_check.php) is also passed.
I'm getting a blank page in get_table.php, 
 
SO I updated the plugin with "jQuery Advanced Order Handler 2.3.3 Rev3 Envelope Module_1".
Still I am getting the same blank page.
 
(1) Changed the code in ./admin/includes/application_top.php
From
       error_reporting(E_ALL & ~E_NOTICE);
To
       error_reporting(E_ALL);
       ini_set('display_errors', '1');
 
The following are error messages in 
 
: Undefined index: Catalog in /home/public_html/admin/includes/column_left.php
: Undefined index: Configuration in on line 78
: Undefined index: Customers in /home/public_html/admin/includes/column_left.php
: Undefined index: Latex Mattress in on line 78
: Undefined index: Localization in /home/public_html/admin/includes/column_left.php
: Undefined index: Locations / Taxes in on line 78
: Undefined index: Modules in /home/public_html/admin/includes/column_left.php
: Undefined index: Orders in on line 78
: Undefined index: Reports in /home/public_html/admin/includes/column_left.php
: Undefined index: Tools in on line 78
 
 
(2) Changed the code in ./admin/get_table.php
From
        oHandler.init();
        $( window ).load(function( event ){
To
        $( window ).load(function( event ){
        oHandler.init();
 
(3) The following are messages in error_log
 
[25-Jul-2014 09:31:50 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[25-Jul-2014 09:31:50 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[25-Jul-2014 04:31:50 America/Chicago] PHP Fatal error:  Call to undefined function tep_db_fetch_all() in /home/xxxxxxx/public_html/admin/includes/modules/order_handler/modals.php on line 108
 
Please help me.

 

 

Hello Michael,

 

What kind of output did you get from the order_handler_check.php file included with the package?

 

It looks like you haven't installed mysqlnd properly, are you on a shared hosting or do you run your own server/VPS?

 

Try with copying the included ./test/order_handler_check.php file to ./admin/order_handler_check.php and then visit that page in your browser. It will test for the necessary functions that are provided by the Mysql Native Driver (mysqlnd).

 

 

 

A good guess for anyone that gets a blank page is that mysqlnd is either not installed at all or not configured properly. Using the file mentioned above to test for this should tell if that is the case or not.

 

Installing mysqlnd on a private server or VPS shouldn't be to much of a hassle, there are plenty of guides on how to do this on most, if not all, operating systems. On a shared hosting you got to ask the provider, any reputable provider should be able to provide mysqlnd (of course, that's my opinion..).

 

The other option is to simply convert all mysqlnd required statements to 'regular' mysqli.

I included a function called mysqli_get_res in ./admin/includes/functions/database.php which can be used instead of mysqli_stmt::get_result.

 

mysqli_result::fetch_all also requires mysqlnd, so that one also needs to be replaced.

Native osC mysql functions like tep_db_query and tep_db_fetch_array could also be used as replacements.

 

 

If anyone wants to do this work, then start looking for places that looks like this:

$res = $stmt_se->get_result();
$res->fetch_all(MYSQLI_ASSOC);

Those needs to be replaced.

 

Start with the ones that gives the fatal error in the PHP log. Then try to replace them with a mysql or mysqli query/statement that gives the same output. Use

var_dump($replace_with_query_var);
die;

to display the output. If it works then proceed to the next query. I think that when one statement have been replaced & is working the remaining ones will be easy to fix.

Link to comment
Share on other sites

Hello Michael,

 

What kind of output did you get from the order_handler_check.php file included with the package?

 

It looks like you haven't installed mysqlnd properly, are you on a shared hosting or do you run your own server/VPS?

 

Try with copying the included ./test/order_handler_check.php file to ./admin/order_handler_check.php and then visit that page in your browser. It will test for the necessary functions that are provided by the Mysql Native Driver (mysqlnd).

 

 

 

A good guess for anyone that gets a blank page is that mysqlnd is either not installed at all or not configured properly. Using the file mentioned above to test for this should tell if that is the case or not.

 

Installing mysqlnd on a private server or VPS shouldn't be to much of a hassle, there are plenty of guides on how to do this on most, if not all, operating systems. On a shared hosting you got to ask the provider, any reputable provider should be able to provide mysqlnd (of course, that's my opinion..).

 

The other option is to simply convert all mysqlnd required statements to 'regular' mysqli.

I included a function called mysqli_get_res in ./admin/includes/functions/database.php which can be used instead of mysqli_stmt::get_result.

 

mysqli_result::fetch_all also requires mysqlnd, so that one also needs to be replaced.

Native osC mysql functions like tep_db_query and tep_db_fetch_array could also be used as replacements.

 

 

If anyone wants to do this work, then start looking for places that looks like this:

$res = $stmt_se->get_result();
$res->fetch_all(MYSQLI_ASSOC);

Those needs to be replaced.

 

Start with the ones that gives the fatal error in the PHP log. Then try to replace them with a mysql or mysqli query/statement that gives the same output. Use

var_dump($replace_with_query_var);
die;

to display the output. If it works then proceed to the next query. I think that when one statement have been replaced & is working the remaining ones will be easy to fix.

 

 

Hi Dr. Rolex,

 

I am using VPS server. Using PHP Version: 5.4.30

 

I confirmed that the Mysqlnd is installed in my server by using the file order_handler_check.php.

 

It says 

Looking good! It looks like MySQL Native Driver is loaded!
Link to comment
Share on other sites

Hello Michael,

 

What kind of output did you get from the order_handler_check.php file included with the package?

 

It looks like you haven't installed mysqlnd properly, are you on a shared hosting or do you run your own server/VPS?

 

Try with copying the included ./test/order_handler_check.php file to ./admin/order_handler_check.php and then visit that page in your browser. It will test for the necessary functions that are provided by the Mysql Native Driver (mysqlnd).

 

 

 

A good guess for anyone that gets a blank page is that mysqlnd is either not installed at all or not configured properly. Using the file mentioned above to test for this should tell if that is the case or not.

 

Installing mysqlnd on a private server or VPS shouldn't be to much of a hassle, there are plenty of guides on how to do this on most, if not all, operating systems. On a shared hosting you got to ask the provider, any reputable provider should be able to provide mysqlnd (of course, that's my opinion..).

 

The other option is to simply convert all mysqlnd required statements to 'regular' mysqli.

I included a function called mysqli_get_res in ./admin/includes/functions/database.php which can be used instead of mysqli_stmt::get_result.

 

mysqli_result::fetch_all also requires mysqlnd, so that one also needs to be replaced.

Native osC mysql functions like tep_db_query and tep_db_fetch_array could also be used as replacements.

 

 

If anyone wants to do this work, then start looking for places that looks like this:

$res = $stmt_se->get_result();
$res->fetch_all(MYSQLI_ASSOC);

Those needs to be replaced.

 

Start with the ones that gives the fatal error in the PHP log. Then try to replace them with a mysql or mysqli query/statement that gives the same output. Use

var_dump($replace_with_query_var);
die;

to display the output. If it works then proceed to the next query. I think that when one statement have been replaced & is working the remaining ones will be easy to fix.

 

 

Hi Dr. Rolex,

 

I am using VPS server. Using PHP Version: 5.4.30

 

I confirmed that the Mysqlnd is installed in my server by using the file order_handler_check.php.

 

It says 

Looking good! It looks like MySQL Native Driver is loaded! 

 

Still I am getting BLANK PAGE. 

 

Please refer my error_log statements once.

 

Please help me how can I get this worked.

Link to comment
Share on other sites

 

Hi Dr. Rolex,

 

I am using VPS server. Using PHP Version: 5.4.30

 

I confirmed that the Mysqlnd is installed in my server by using the file order_handler_check.php.

 

It says 

Looking good! It looks like MySQL Native Driver is loaded! 

 

Still I am getting BLANK PAGE. 

 

Please refer my error_log statements once.

 

Please help me how can I get this worked.

 

 

It looks like you forgot to complete step #7 in the installation instructions.

[25-Jul-2014 04:31:50 America/Chicago] PHP Fatal error:  Call to undefined function tep_db_fetch_all() in /home/xxxxxxx/public_html/admin/includes/modules/order_handler/modals.php on line 108

Make sure that the tep_db_fetch_all function exists in ./admin/includes/functions/database.php

Edited by Dr. Rolex
Link to comment
Share on other sites

It looks like you forgot to complete step #7 in the installation instructions.

[25-Jul-2014 04:31:50 America/Chicago] PHP Fatal error:  Call to undefined function tep_db_fetch_all() in /home/xxxxxxx/public_html/admin/includes/modules/order_handler/modals.php on line 108

Make sure that the tep_db_fetch_all function exists in ./admin/includes/functions/database.php

 

Hi Dr. Rolex,

 

Thanks for your information.

 

I found the function tep_db_fetch_all() in ./admin/includes/functions/database.php

 

I dont know why it is showing this error message?

 

Please help me.

Link to comment
Share on other sites

It looks like you forgot to complete step #7 in the installation instructions.

[25-Jul-2014 04:31:50 America/Chicago] PHP Fatal error:  Call to undefined function tep_db_fetch_all() in /home/xxxxxxx/public_html/admin/includes/modules/order_handler/modals.php on line 108

Make sure that the tep_db_fetch_all function exists in ./admin/includes/functions/database.php

 

Hi Dr. Rolex,

 

We fixed the issue with missing function.

 

Now we are getting the page on screen.

 

While we are adding new record, we are getting the following error message.

 

An error occured while communicating to the server.
 
Please help me.
Link to comment
Share on other sites

Hi Dr Rolex just installed your Rev 3.1 version and just thought I'd point out the following error message I get.

 

1.)  In order_handler/general_functions.php - I had to comment out the tep_count_modules function - previously declared in admin/includes/functions/general.php

/*
 * commented out function - previously declared in general.php line 1374
 *

  function tep_count_modules($modules = '') {
    $count = 0;

    if (empty($modules)) return $count;

    $modules_array = explode(';', $modules);

    for ($i=0, $n=sizeof($modules_array); $i<$n; $i++) {
      $class = substr($modules_array[$i], 0, strrpos($modules_array[$i], '.'));

      if (isset($GLOBALS[$class]) && is_object($GLOBALS[$class])) {
        if ($GLOBALS[$class]->enabled) {
          $count++;
        }
      }
    }

    return $count;
  }

  function tep_count_payment_modules() {
    return tep_count_modules(MODULE_PAYMENT_INSTALLED);
  }

  function tep_count_shipping_modules() {
    return tep_count_modules(MODULE_SHIPPING_INSTALLED);
  }  */

I find that if I expand the order - I get a modal popup which says "An error occured while communicating to the server."  -  Any Ideas??

"The doorstep to the temple of wisdom is a knowledge of our own ignorance."

Link to comment
Share on other sites

then another issue I have (and for the life of me cannot find where to edit this) is

 

I have the pruchase order payment module installed.  If I use the edit "Edit Orders" link - I have an error with the Purchase Order payment module - the small drop down

 

You can see the error if you view the source - see lines 1 and 4 - the purchase order payment module is reflecting twice

<option value="["_custom","Purchase Order <span class=\"smal"]">Purchase Order <span class="smal</option>
<option value="["cod","Cash on Delivery"]">Cash on Delivery</option>
<option value="["paypal_express","PayPal Express Checkout"]">PayPal Express Checkout</option>
<option value="["po","Purchase Order"]">Purchase Order</option>
<option value="["_manual",""]">Manual Input</option>

I think what it's doing is getting confused with the modules public_title and title.  - some payment modules have a public_title which appears on the front end and the title which just appears in admin, some modules only have title and no public_title

 

The function_selection() in the payment modules:

 

You'll find some have

   function selection() {
      return array('id' => $this->code,
                   'module' => $this->title);
    }

and

function selection() {
      return array('id' => $this->code,
                   'module' => $this->public_title);
    }
Edited by mommaroodles

"The doorstep to the temple of wisdom is a knowledge of our own ignorance."

Link to comment
Share on other sites

is there not perhaps something on this line 111 of edit_orders.php ?

<td class="main"><span><?php echo tep_cfg_pull_down_payment($order -> info['payment_method'], 'id="payment_method_pull_down" class="multiselect btn btn-xs btn-info" data-table="orders" data-field="payment_method"', $custom); ?></span></td>

"The doorstep to the temple of wisdom is a knowledge of our own ignorance."

Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...