• Resolved norisknofun11

    (@norisknofun11)


    Hi! On the thermal printer is there a way of having as column sorting:
    product quantity
    product name
    product price (the total)
    delete the column product item price

    Thanks!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @norisknofun11,

    Yes, it is possible to sort this column and remove the price column.
    Here’s a filter that can hide the price column into the table. Add this code snippet in functions.php file of your currently active theme.

    /**
     * Print in 80mm size.
     */
    function print_paper_resize() {
        ?>
    <style>
        /* CSS Media Queries for Print
        ------------------------------------------*/
        @media print {
            body {
                font-size: 8.5pt;
                max-width: 80mm;
                margin: auto!important;
                font-weight: 550;
            }
            .shipping-address{
                width:80%!important;
            }
            .billing-address{
                width:70%!important;
                margin-bottom:1em!important;
            }
            h2,h3{
                margin-bottom:0!important;
            }
            th{
                padding-bottom:0!important;
                padding-left:0.5em!important;
            }
            td{
                padding:0.35em 0.35em 0!important;
            }
            .order-addresses{
                margin-bottom:1em!important;
            }
            .order-info li strong {
                font-weight:600!important;
                display:inline!important;
                padding-right:1.4em!important;
            }
            .order-info{
                margin-bottom:0!important;
            }
            .order-branding{
                margin-bottom:0!important;
            }
            .product-quantity, .total-quantity,{
                padding-left:1.0em!important;
            }
    		.head-quantity{
    			padding-left:0em!important;
    		}
            .includes_tax {
                white-space:nowrap!important;
            }
    		.order-items .head-item-price,
    		.order-items .product-item-price,
    		.order-items .total-item-price{
    			display:none;
    		}
            .content {
            /* Remove padding to not generate empty follow up pages */
                padding-bottom: 0;
            }
        }
    </style>
        <?php
    }
    add_action( 'wcdn_head', 'print_paper_resize', 10, 1 );

    screenshot for your reference: https://prnt.sc/C_UL_Uk1q9H2

    To change the placement of the ‘Quantity’ column, you need to replace the given file. Currently, it is difficult to modify it using CSS. I am sending you the file; please download and replace it, with the provided path.

    File- https://www.dropbox.com/scl/fi/i6xz5d3tysvt2bm24dmq1/print-content.php?rlkey=zpmxew61nz17jgdbkmhd9yu3n&dl=0
    Path- \woocommerce-delivery-notes\templates\print-order\

    screenshot for your reference: https://prnt.sc/Db8IV0FRoFaC

    Note: The changes made will not persist through new updates, so you will need to replace this file with each update.

    Please let us know if the given solution is working for you.

    Regards,
    Nikhil.

    Thread Starter norisknofun11

    (@norisknofun11)

    as always, all working!

    thanks!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘different sorting of columns’ is closed to new replies.