star-micronics / star-cloudprnt-for-woocommerce

Print to Star CloudPRNT compatible printers from WooCommerce
MIT License
10 stars 8 forks source link

Change size typo #26

Open throma98 opened 1 year ago

throma98 commented 1 year ago

Hello, I would like to know if it is possible to remove the order number from the ticket and increase the size of the typography please?

Many thanks!

kjarret commented 12 months ago

I think it could solve your problem, overwrites this code in place of the old one.

236. // Top of page Title
237. $title_text = get_option('star-cloudprnt-print-header-title');
338. if(!empty($title_text))
339. {
340.    // Set formatting for title
341.    $printer->set_text_emphasized();
342.    $printer->set_text_center_align();
343.    $printer->set_font_magnification(2, 2);
344.    // Print the title - word wrapped (NOTE - php wordwrap() is not multi-byte aware, and definitely not half/full width character aware)
345.    $printer->add_text_line(wordwrap($title_text, $selectedPrinter['columns']/2, "\n", true)); // Columns are divided by 2 because we are using double width characters.
346.    // Reset text formatting
347.    $printer->set_text_left_align();
348.    $printer->cancel_text_emphasized();
349.    $printer->set_font_magnification(1, 1);
350.    $printer->add_new_line(1);
351. }
352. 
353. // Print sub-header
354. /*$o_num = "Order #".$order_number;    */      // Order number text to print
355. $p_time = date("{$date_format} {$time_format}", current_time('timestamp'));            // TIme of printing text
356. $sub_header = star_cloudprnt_get_column_separated_data(array(/*$o_num,*/ $p_time), $selectedPrinter['columns']);
357. if(!empty($sub_header)) {
358.    $printer->add_text_line($sub_header);
359. } else {
360.    $pw($p_time);
361.    /*$pw($o_num);*/
362. }
kjarret commented 1 month ago

in your file wp-content > plugins > star-cloudprnt-for-woocommerce-master > order-handler.php

// Set text font size larger $printer->set_font_magnification(2, 2); $printer -> add_text_line("Larger text"); // Reset text size to default $printer->set_font_magnification(1, 1);