News:

Looking for documentation? Take a look on our wiki

Main Menu

How to input product image into invoice

Started by null13, June 24, 2016, 05:15:14 AM

Previous topic - Next topic

null13

Hi all,

Help me please , i want to know how to input product image into invoice.

thank you so much.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

null13

Now i can add product image on invoice .

Add in line 105 befor

                       <td align="center">
            <?php echo $item->order_item_sku; ?>
         </td>


I use this code

<?php
         if (!empty($item->product_quantity)) {

             $db = JFactory::getDBO();
             $qs = "select file_url
               from cathtest_virtuemart_medias
               where virtuemart_media_id ='34'"; //print_r($qs);
         $db->setQuery($qs);
         $item2 = $db->loadAssocList();
         foreach($item2 as $file_thumb){
            //echo $file_thumb['file_url_thumb'];
             ?>
             <img src="<?php  echo JURI::root () . $file_thumb['file_url_thumb'] ?>" />
             <?php
             }
          }

        ?>   

add in invoice_item.php