Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor lawrenceowen

    (@lawrenceowen)

    @rfreshd

    Hi, yes this should be straightforward thankfully, since their docs are good.
    I can’t test directly, since I don’t have their plugin here, but the following code should work:

    $del_date = $order->get_meta( 'jckwds_date' );
    $del_time_slot = $order->get_meta( 'jckwds_timeslot' );
    $del_timestamp = $order->get_meta( 'jckwds_timestamp' );
    			
    $printer->add_text_line("Delivery Date: ".$del_date);
    $printer->add_text_line("Delivery Time Slot: ".$del_time_slot);
    $printer->add_text_line("Timestamp: ".$del_timestamp);
    $printer->add_new_line(1);

    This can be added to order-handler.php, in the function named star_cloudprnt_print_order_summary($selectedPrinter, $file, $order_id) which I think you should find at around line 188.

    I would recommends adding this either above or below the line that contains star_cloudprnt_create_address($order, $order_meta, $printer); depending on where you would like it to be printed on the receipt. Of if you prefer to print the delivery slot info before the item list, then place the code before the line that contains star_cloudprnt_create_receipt_items($order, $printer, $selectedPrinter['columns']);.

    I hope that this helps, but I can see that you are in the UK, which means that you can get more direct support from the EMEA office via [email protected] if you need further assistance (i.e. a screen share etc.).

    Thread Starter rfreshd

    (@rfreshd)

    This is great, thank you so much for your help! My client hasn’t received the printer yet but once they do I’ll test and let you know how it works for future reference should anyone else require the same info.

    Thanks again,
    Jessica

    Plugin Contributor lawrenceowen

    (@lawrenceowen)

    @rfreshd Hi Jessica,

    Really glad that we could help.
    Feel free to get in touch if you have any difficulties when your client receives their printer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Help’ is closed to new replies.