VPS business hosting starting at $29.95/24/7 premium technical support

Remove sku column from Magento 2 invoice and pdf

Edit the file

Inside function draw(), remove/comment following code:

   // draw SKU
        $lines[0][] = [
            'text' => $this->string->split($this->getSku($item), 17),
            'feed' => 290,
            'align' => 'right',

To remove the SKU header in table header, edit the file

//$lines[0][] = ['text' => __('SKU'), 'feed' => 290, 'align' => 'right'];

and copy the file vendor/magento/module-sales/view/frontend/templates/email/items/order/default.phtml
to app/design/your/theme/Magento_Sales/templates/email/items/order/default.phtml
and remove the code

<p class="sku"><?= /* @escapeNotVerified */  __('SKU') ?>: <?= $block->escapeHtml($block->getSku($_item)) ?></p>

Author: Harshvardhan Malpani

PHP Developer based in New Delhi, India. Working as a freelance web developer providing server deployment, website development and maintenance services.

2 thoughts on “Remove sku column from Magento 2 invoice and pdf”

  1. Hi, Harshvardhan Malpani
    could you please explain what is “feed ” mean by below query ,its instead of width ? also any rules declaring feed ?

    // draw SKU
    $lines[0][] = [
    ‘text’ => $this->string->split($this->getSku($item), 17),
    ‘feed’ => 290,
    ‘align’ => ‘right’,

Leave a Reply

Your email address will not be published. Required fields are marked *