cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve Product Description at PDF Invoice

Retrieve Product Description at PDF Invoice

Hello Guys !!! 

 

I´m trying to show product description at PDF invoice and I´d tried 2 different procedures without success....

Here is what I´d tried so far:

 

1) I´d hired a magento partner to do a customization (abandoned without finishing) and they put it like this: <p data-bind="html: getProductDescription()"></p>

(not working) 

2) I´d searched the forums and found this post: Add-short-description-to-Magento-2-pdf-invoice

And added this code:

$objManager = \Magento\Framework\App\ObjectManager::getInstance();
$itemId = $item->getProductId();
$productObject = $objManager->create('Magento\Catalog\Model\Product')->load($itemId);
/* use for strip tag from short description */
$description =$this->filterManager->stripTags($productObject->getDescription());

When I add without <script> tags it shows as text and if I add the <script> tag it doesn´t show anything. 

Sorry, I´m not a programmer and I´m not sure how do make it work and where and how to insert the code. 

 

Can someone help me out with this? 

 

Thanks a lot in advance!