Jump to content

Description in pdf


altermim

Recommended Posts

Hello, i need insert short description in invoice pdf. I get short-descripton from Product.php, if i use that, then i get NULL, i create variable in orderDetail.php referring to Product.tpl. In DB i create a table product_description. 

/** @var string */
public $product_description;
'product_description' =>array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml')
protected function giveMeDescriptio()
{
       $this->product_description = $product['description_short'];
}

Now i have all that i need, but table product_description empty consequently i get NULL again. In this forum i think i find a solution of my problem here https://www.prestashop.com/forums/topic/281869-solved-get-product-images-in-historytpl/

But i don't understand what i should write in this block of code?

{foreach from=$orders item=order name=myLoop}
        {$myproduct=$order.product}           
{foreach from=$myproduct item=pro name=myLoop2}            
                    {$myimg=$pro.image}
                    <img src="{$link->getImageLink(orderimage, $myimg->id_image, 'home_default')}"/>                
{/foreach}      
{/foreach}
Edited by altermim (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...