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

    (@lawrenceowen)

    @cgabelli
    That is not a standard option currently, but you could try adding the following code to your order-handler.php file, in the function named “star_cloudprnt_print_order_summary”. I suggest adding the code directly underneath the call to “star_cloudprnt_create_receipt_items()”;

    $formatted_discount = number_format($order_meta['_cart_discount'][0], 2, '.', '');
    $printer->add_new_line(1);
    $printer->set_text_right_align();
    $printer->add_text_line("DISCOUNT 
    ".star_cloudprnt_get_codepage_currency_symbol().$formatted_discount);
    $printer->set_text_left_align();

    If you do modify your order-handler.php file then please make a backup first.

    Thread Starter cgabelli

    (@cgabelli)

    great, and how can I show the couponcode in the printout?

    Plugin Contributor lawrenceowen

    (@lawrenceowen)

    That is not so easy and we haven’t implemented it in the past. I will look into it but please allow a day or two.

    Plugin Contributor lawrenceowen

    (@lawrenceowen)

    @cgabelli

    I have looked up how to access coupon information for an order and made a modified version of the soot to be released version 2.0 update of the plugin. You can test this at https://vault.star-emea.com/s/94cdZCKpdExdirw

    This version is based on the 2.0 beta 01 sample that I made available this week, but additionally will print any used coupon codes, and the total discount for an order.

    Please let me know how you get on. If your testing is positive, then I will include these changes in the official version 2.0 release.

    • This reply was modified 5 years, 4 months ago by lawrenceowen.
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘coupon discont’ is closed to new replies.