Support » Plugin: Star CloudPRNT for WooCommerce » mutliple errors when front end order placed

  • We have ordered the printer and setup using WooCommerce plugin. Printer has been found and connected.

    Placed a test order and got multiple errors on the frontend screen as follows

    I can see two issues
    (1) Code needs refining for WooCommerce
    (2) Mandatory to have a shipping address (currently we have this turned off)

    We havent managed to get a receipt to print as yet.

    —-

    Notice: Undefined offset: 0 in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php on line 280

    Notice: Undefined index: printerMAC in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_text_plain.inc.php on line 24

    Notice: post was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/flatsome/page-checkout.php’), wc_get_template_part, load_template, require(‘/themes/flatsome/woocommerce/checkout/layouts/checkout.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, flatsome_contentfix, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::checkout, WC_Shortcodes::shortcode_wrapper, WC_Shortcode_Checkout::output, WC_Shortcode_Checkout::order_received, wc_get_template, include(‘/themes/flatsome/woocommerce/checkout/thankyou.php’), do_action(‘woocommerce_thankyou’), WP_Hook->do_action, WP_Hook->apply_filters, star_cloudprnt_woo_on_thankyou, star_cloudprnt_print_order_summary, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. in /home/sites/11a/3/3b6e75b09c/public_html/wp-includes/functions.php on line 5167

    Notice: order_date was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/flatsome/page-checkout.php’), wc_get_template_part, load_template, require(‘/themes/flatsome/woocommerce/checkout/layouts/checkout.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, flatsome_contentfix, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::checkout, WC_Shortcodes::shortcode_wrapper, WC_Shortcode_Checkout::output, WC_Shortcode_Checkout::order_received, wc_get_template, include(‘/themes/flatsome/woocommerce/checkout/thankyou.php’), do_action(‘woocommerce_thankyou’), WP_Hook->do_action, WP_Hook->apply_filters, star_cloudprnt_woo_on_thankyou, star_cloudprnt_print_order_summary, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong Please see Debugging in WordPress for more informa in /home/sites/11a/3/3b6e75b09c/public_html/wp-includes/functions.php on line 5167

    Deprecated: WC_Order::get_item_meta is deprecated since version 3.0! Use wc_get_order_item_meta instead. in /home/sites/11a/3/3b6e75b09c/public_html/wp-includes/functions.php on line 4713

    Deprecated: WC_Order::get_item_meta is deprecated since version 3.0! Use wc_get_order_item_meta instead. in /home/sites/11a/3/3b6e75b09c/public_html/wp-includes/functions.php on line 4713

    Deprecated: WC_Order::get_item_meta is deprecated since version 3.0! Use wc_get_order_item_meta instead. in /home/sites/11a/3/3b6e75b09c/public_html/wp-includes/functions.php on line 4713

    Notice: Undefined index: _shipping_first_name in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php on line 151

    Notice: Undefined index: _shipping_last_name in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php on line 152

    Notice: Undefined index: _shipping_address_1 in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php on line 153

    Notice: Undefined index: _shipping_address_2 in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php on line 154

    Notice: Undefined index: _shipping_city in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php on line 155

    Notice: Undefined index: _shipping_state in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php on line 156

    Notice: Undefined index: _shipping_postcode in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php on line 157

    Notice: post was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/flatsome/page-checkout.php’), wc_get_template_part, load_template, require(‘/themes/flatsome/woocommerce/checkout/layouts/checkout.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, flatsome_contentfix, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::checkout, WC_Shortcodes::shortcode_wrapper, WC_Shortcode_Checkout::output, WC_Shortcode_Checkout::order_received, wc_get_template, include(‘/themes/flatsome/woocommerce/checkout/thankyou.php’), do_action(‘woocommerce_thankyou’), WP_Hook->do_action, WP_Hook->apply_filters, star_cloudprnt_woo_on_thankyou, star_cloudprnt_print_order_summary, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. in /home/sites/11a/3/3b6e75b09c/public_html/wp-includes/functions.php on line 5167

    Warning: opendir(/home/sites/11a/3/3b6e75b09c/public_html/wp-content/star-cloudprnt/printerdata//queue/): failed to open dir: No such file or directory in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 9

    Warning: copy(/home/sites/11a/3/3b6e75b09c/public_html/wp-content/star-cloudprnt/printerdata//queue/1.txt): failed to open stream: No such file or directory in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 93

    Warning: fopen(/home/sites/11a/3/3b6e75b09c/public_html/wp-content/star-cloudprnt/printerdata//queue/1): failed to open stream: No such file or directory in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 94

    Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 95

    Warning: fclose() expects parameter 1 to be resource, boolean given in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 96

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter ESC IT (Web Design Bristol)

    (@escitsupport)

    Just to confirm, the following test below was also done using the standard WordPress theme (opposed to flatsome above)

    Edit”Checkout”
    Thank you. Your order has been received.

    Order number: 162
    Date: 2 July 2020
    Total: £3.00
    Payment method: Credit Card (Stripe)

    Notice: Undefined offset: 0 in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php on line 280

    Notice: Undefined index: printerMAC in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_text_plain.inc.php on line 24

    Notice: post was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/twentyseventeen/page.php’), get_template_part, locate_template, load_template, require(‘/themes/twentyseventeen/template-parts/page/content-page.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::checkout, WC_Shortcodes::shortcode_wrapper, WC_Shortcode_Checkout::output, WC_Shortcode_Checkout::order_received, wc_get_template, include(‘/plugins/woocommerce/templates/checkout/thankyou.php’), do_action(‘woocommerce_thankyou’), WP_Hook->do_action, WP_Hook->apply_filters, star_cloudprnt_woo_on_thankyou, star_cloudprnt_print_order_summary, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This in /home/sites/11a/3/3b6e75b09c/public_html/wp-includes/functions.php on line 5167

    Notice: order_date was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/twentyseventeen/page.php’), get_template_part, locate_template, load_template, require(‘/themes/twentyseventeen/template-parts/page/content-page.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::checkout, WC_Shortcodes::shortcode_wrapper, WC_Shortcode_Checkout::output, WC_Shortcode_Checkout::order_received, wc_get_template, include(‘/plugins/woocommerce/templates/checkout/thankyou.php’), do_action(‘woocommerce_thankyou’), WP_Hook->do_action, WP_Hook->apply_filters, star_cloudprnt_woo_on_thankyou, star_cloudprnt_print_order_summary, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. in /home/sites/11a/3/3b6e75b09c/public_html/wp-includes/functions.php on line 5167

    Deprecated: WC_Order::get_item_meta is deprecated since version 3.0! Use wc_get_order_item_meta instead. in /home/sites/11a/3/3b6e75b09c/public_html/wp-includes/functions.php on line 4713

    Deprecated: WC_Order::get_item_meta is deprecated since version 3.0! Use wc_get_order_item_meta instead. in /home/sites/11a/3/3b6e75b09c/public_html/wp-includes/functions.php on line 4713

    Deprecated: WC_Order::get_item_meta is deprecated since version 3.0! Use wc_get_order_item_meta instead. in /home/sites/11a/3/3b6e75b09c/public_html/wp-includes/functions.php on line 4713

    Notice: post was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/twentyseventeen/page.php’), get_template_part, locate_template, load_template, require(‘/themes/twentyseventeen/template-parts/page/content-page.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::checkout, WC_Shortcodes::shortcode_wrapper, WC_Shortcode_Checkout::output, WC_Shortcode_Checkout::order_received, wc_get_template, include(‘/plugins/woocommerce/templates/checkout/thankyou.php’), do_action(‘woocommerce_thankyou’), WP_Hook->do_action, WP_Hook->apply_filters, star_cloudprnt_woo_on_thankyou, star_cloudprnt_print_order_summary, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This in /home/sites/11a/3/3b6e75b09c/public_html/wp-includes/functions.php on line 5167

    Warning: opendir(/home/sites/11a/3/3b6e75b09c/public_html/wp-content/star-cloudprnt/printerdata//queue/): failed to open dir: No such file or directory in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 9

    Warning: copy(/home/sites/11a/3/3b6e75b09c/public_html/wp-content/star-cloudprnt/printerdata//queue/1.txt): failed to open stream: No such file or directory in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 93

    Warning: fopen(/home/sites/11a/3/3b6e75b09c/public_html/wp-content/star-cloudprnt/printerdata//queue/1): failed to open stream: No such file or directory in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 94

    Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 95

    Warning: fclose() expects parameter 1 to be resource, boolean given in /home/sites/11a/3/3b6e75b09c/public_html/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 96

    Thread Starter ESC IT (Web Design Bristol)

    (@escitsupport)

    We managed to put a workaround in for this as follows:

    order-handler.php

    line 269 onwards

    the MAC was not being set although there is an underlying issue why the default printer isnt working

    See the line that has //ZFIX on it which we added to make it work

    ——

    foreach ($printerList as $printer)
    {
    if (get_option(‘star-cloudprnt-printer-select’) == $printer[‘name’])
    {
    $selectedPrinter = $printer;
    $selectedPrinterMac = $printer[‘printerMAC’];
    break;
    }
    }

    if (sizeof($selectedPrinter) == 0) {
    $selectedPrinter = $printerList[0];
    $selectedPrinterMac = $printer[0][‘printerMAC’]; //ZFIX
    }

    Plugin Contributor lawrenceowen

    (@lawrenceowen)

    Hi

    You basically have two issues here. The first is that our currently published plugin is still using some old WordPress APIs. This generates a lot of noise if you are running with debug mode enabled, but is safe (unless you want to run a production side with debug mode enabled, which is not recommended). However I’m in the process of overhauling it and you can download a sample version of the next release from https://vault.star-emea.com/s/pKdTw69BCH9rnro which is updated to use the currently recommended WordPress/WooCommerce APIs.

    Secondly, you are getting some errors (i.e. the MAC address variable) because your printer has not been able to connect to your server and so the plugin hasn’t created those resources. You’re right that this is due to the underlying issue.

    The most common reason that a printer is not able to connect to the server is that you are using an mC-Print model printer with earlier than version 3.0 firmware, and a web server with very strict TLS cypher suite requirements. Updating the printer to version 3.0 firmware will resolve this as it enables printer side support for more, cypher suites. The easiest way to update your printer firmware is with the “mC-Print Utility” app that is available via Google Play, or Apple App stores.

    Of course, other network level issues might be preventing the printer from talking with the server, such as the printer being on a local network without internet access, misconfigured CloudPRNT URL, firewalls, server side traffic filters etc. but definitely check the firmware first.

    Plugin Contributor lawrenceowen

    (@lawrenceowen)

    I’m marking this as resolved, because I believe it is now working. Feel free to get in touch again though if you are still having problems.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘mutliple errors when front end order placed’ is closed to new replies.