• Hi

    I try to get the product and the total price in one Line.
    The problem is that long word will not wraped the text and give me a empty line.
    is there a posibility to wrap it?
    Thank you

    $product_line = star_cloudprnt_filter_html($item_qty." x ".$product_name . $product_info);
    
    			$printer->set_text_emphasized();
    			$printer->add_text_line(star_cloudprnt_get_column_separated_data(array($product_line,$formatted_total_price), $max_chars));
    			$printer->cancel_text_emphasized();
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor lawrenceowen

    (@lawrenceowen)

    @coria

    PHP has a wordwrap function that you could use do do this.

    Alternatively, you can add a hidden attribute (named “star_cp_print_name”) to any product on your site to specify an alternative/abbreviated name that will be used for printing.

    Thread Starter coria

    (@coria)

    Thank you for your reply.. i get no notification on this.

    if i us wordwrap on the above code then the line is empty.

    Thread Starter coria

    (@coria)

    	$product_line_text = wordwrap($product_line, 20, "/n", true);
    	$printer->add_text_line(star_cloudprnt_get_column_separated_data(array($product_line_text,$formatted_total_price), $max_chars));
    

    this code give me a empty line.

    • This reply was modified 3 years, 6 months ago by coria.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Text Wrap on Main Product’ is closed to new replies.