• Hello.

    I have a TSP654IIW, and using the plugin to my Woocommerce site.

    The plugin works, it can print the order. But I found an issue and a question:

    1.) If customers pay by PayPal standard, it does not print if they do not click “Return to Merchant” button after the transaction.

    We are using PayPal Standard as the main and only payment gateway. During the payment test, we found out one problem.

    After finishing the PayPal transaction, we have received the order email, but no receipt is printed. We waited but nothing happen until we click the “Return to Merchant” button after paying by PayPal. Once we clicked on it, it printed instantly.

    Here is the screenshot: https://i.imgur.com/pIGvqH7.jpg

    Now the problem is many of the customers may not click on that button after they pay, so it will not trigger the printing. And PayPal standard is one of the main payment gateway on Woocommerce. Is there a way to make it just print after the order is made?

    Otherwise, can you tell us in your design, which payment gateway will print the receipt automatically?

    2.) Anyway to edit/change the layout of the receipt.

    This can be an option. Is there a way to change or customize the receipt? We would like to arrange the products to print sorting by Categories.

    Again, number 2 is an option. If there is a way to make it work on number 1, please let us know.

    THank you!

    • This topic was modified 7 years, 4 months ago by wesleyli.
    • This topic was modified 7 years, 4 months ago by wesleyli.
    • This topic was modified 7 years, 4 months ago by wesleyli.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter wesleyli

    (@wesleyli)

    Hello.

    For 1.), it seems like I found out the reason and solution.

    I was in the using the PayPal sandbox to do all the testing, and the “Return to Merchant” button appears every time you test. However, once we switch back to real transaction, even PayPal standard will redirect automatically back to our website without clicking the “Return to Merchant”.

    As a result, the plugin will trigger the printer to print without any problem.

    Thread Starter wesleyli

    (@wesleyli)

    But, for 2.)

    – Is it possible to modifity the layout of the receipt?
    – And if we want it to print 2 receipts (or more sometimes), can we adjust it?

    Thank you.

    Plugin Author Star Europe

    (@fmahmood)

    Hi wesleyli,

    Sorry for the delay in getting back to you, we don’t actively monitor this forum. In the future, for fast support we recommend e-mailing us directly on the following address: [email protected]

    This plugin integrates with WooCommerce by using hooks which WooCommerce provide. These hooks allow our code to be executed when certain events occur within the WooCommerce lifecycle, for example you can hook onto order status changes.

    The way our plugin detects a successful order has been placed is when the WooCommerce “Thank you / confirmation” page is displayed, this is known as the woocommerce_thankyou event. So as you have rightly discovered, if PayPal does not automatically return back to WooCommerce, then that event is not fired so the plugin code will not be executed. There may be better hooks to use that you can look into and try changing but from our testing the “thankyou” hook seems to be the most reliable way.

    To answer your second question, yes it is possible to modify the layout of the receipt. As of 1.0.2, you can edit the “order-handler.php” file which basically uses the Star Line Mode builder class to generate the receipt content. We plan to add in support for PNG image printing soon too (this is already possible on the printer side but not implemented in the plugin currently), this will allow for greater customisation.

    You can print 2 receipts as well, as of 1.0.2, along with the order history function you can specify the copy count too by modifying the “printer_star_line.inc.php” function, just change the last parameter of line 102 to your desired amount of copies.

    E.g:
    star_cloudprnt_queue_add_print_job($this->printerMac, $this->tempFilePath, 1); // 1 copy
    star_cloudprnt_queue_add_print_job($this->printerMac, $this->tempFilePath, 2); // 2 copies
    star_cloudprnt_queue_add_print_job($this->printerMac, $this->tempFilePath, 5); // 5 copies

    We plan to add this into the interface too, so you won’t have to change the actual code in the future.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Questions with Auto Print’ is closed to new replies.