
Originally Posted by
jimmie
im getting this error when i click confirm order
[10-Sep-2018 13:52:11 America/New_York] PHP Warning: strpos() expects parameter 1 to be string, array given in /var/www/clients/client1/web4/web/WorkSite/includes/classes/shipping.php on line 32
[10-Sep-2018 13:52:11 America/New_York] PHP Warning: substr() expects parameter 1 to be string, array given in /var/www/clients/client1/web4/web/WorkSite/includes/classes/shipping.php on line 32
[10-Sep-2018 13:52:11 America/New_York] PHP Warning: strpos() expects parameter 1 to be string, array given in /var/www/clients/client1/web4/web/WorkSite/includes/classes/order.php on line 390
[10-Sep-2018 13:52:11 America/New_York] PHP Warning: strpos() expects parameter 1 to be string, array given in /var/www/clients/client1/web4/web/WorkSite/includes/modules/order_total/ot_shipping.php on line 41
[10-Sep-2018 13:52:11 America/New_York] PHP Warning: substr() expects parameter 1 to be string, array given in /var/www/clients/client1/web4/web/WorkSite/includes/modules/order_total/ot_shipping.php on line 41
[10-Sep-2018 13:52:11 America/New_York] PHP Warning: strpos() expects parameter 1 to be string, array given in /var/www/clients/client1/web4/web/WorkSite/includes/classes/order.php on line 700
[10-Sep-2018 13:52:11 America/New_York] PHP Warning: addslashes() expects parameter 1 to be string, array given in /var/www/clients/client1/web4/web/WorkSite/includes/functions/functions_general.php on line 861
[10-Sep-2018 13:52:11 America/New_York] PHP Warning: explode() expects parameter 2 to be string, array given in /var/www/clients/client1/web4/web/WorkSite/includes/classes/observers/class.advshipperCheckoutProcess.php on line 48
[10-Sep-2018 13:52:11 America/New_York] PHP Warning: explode() expects parameter 2 to be string, array given in /var/www/clients/client1/web4/web/WorkSite/includes/classes/observers/class.sopshipperCheckoutProcess.php on line 48
[10-Sep-2018 13:52:11 America/New_York] PHP Fatal error: Call to a member function RecordCount() on a non-object in /var/www/clients/client1/web4/web/WorkSite/includes/classes/observers/class.products_with_attributes_stock.php on line 727
SBA offers one and only one modification to the includes/modules/pages/checkout_confirmation/header_php.php file (which looks like the file that may be associated with this issue). The one change is to add
Code:
, $order->products[$i]['attributes'], 'order'
to the end of the line that starts with:
Code:
if ($stock_check[$i] = zen_check_stock($order->products[$i]['id'], $order->products[$i]['qty']
All of the issues identified above appear to be related to the header file and capturing information from the generated page. The first issue appears to be that the shipping method was stored to the page as an array which seems to cause many of the follow-on issues.
At any rate, SBA makes the one change identified above and adds changes in two places of the checkout_confirmation template to display some additional information (that information is not required to be on the page to support operation, but helps keep information together as relates to the customid information if desired to be shown.) Technically, if both files were restored to their original condition then SBA would work just fine except for the condition where the person arriving at this page may be permitted to purchase an item that has already run out of stock because a "previous" person purchased it just before the confirmation page was processed.
What I'm saying is, that while perhaps one of the files from the plugin was used to fully overwrite some existing template file, there really is little from the provided template file that needs to be modified, as such I can not say that there is a specific problem with the plugin, but perhaps a way that it was "introduced" into the store code. Typically should start at the top of the errors and work down, this means that the first issue seen is that line 32 of the shipping class should be receiving a string not an array. After that, pretty much everything else is a result of that issue.
Bookmarks