• Hey @lawrenceowen,

    I’m trying to include the extra fee (Tips) to print in a separate row as i’m trying to do below. I’ve had this issue since the beginning when I started using the plugin. This is also related to the sub-total printing together with the extra fee. In the woocommerce order email. it’s all separated. But in the receipt. I’m not sure how to print it. Your help is much appreciated.

    $formatted_overall_subtotal = number_format($order_meta[‘_order_tax’][0], 2, ‘.’, ”) / 0.13;
    $printer->add_text_line(“SUBTOTAL “.star_cloudprnt_get_codepage_currency_symbol().number_format($formatted_overall_subtotal, 2, ‘.’, ”));
    $formatted_tip = number_format($order_meta[‘_fees’][0], 2, ‘.’, ”);
    $printer->add_text_line(“TIP “.star_cloudprnt_get_codepage_currency_symbol().$formatted_tip);
    $formatted_overall_total_taxes = number_format($order_meta[‘_order_tax’][0], 2, ‘.’, ”);
    $printer->add_text_line(“HST “.star_cloudprnt_get_codepage_currency_symbol().$formatted_overall_total_taxes);
    $formatted_overall_total_price = number_format($order_meta[‘_order_total’][0], 2, ‘.’, ”);
    $printer->add_text_line(“TOTAL “.star_cloudprnt_get_codepage_currency_symbol().$formatted_overall_total_price);
    $printer->set_text_left_align();

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

    (@lawrenceowen)

    Hi @notion9
    I really don’t know if that’s the right way or not to retrieve the tip value, but your code to print an extra line looks correct. What is the problem you have when you use this code modification? Is it a problem with the printing part, or with retrieving the correct fee values?

    Thread Starter notion9

    (@notion9)

    Hey @lawrenceowen,

    It’s printing the line. I guess I’m not able to print the correct values. I had reached out to you before regarding this. I’m using checkout add-on for receiving tips on the site. But the subtotal value adds tip to it and prints it together. I’m not able to get a order meta for the tip value separately. What I’m trying to do is print the subtotal and tips separately on it’s own line. When you released the “additional information” update, I was hoping that it would pickup the order meta for tips. But it is not. You just replied to my other query. May be I will try to download and use that version of the plugin and see if I have any luck.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Extra Fee – Print’ is closed to new replies.