[Skip to main content](#vessel-content)

#   description not showing in email or pdf variants

##

- **[Dibben](/forum/user/6788-dibben "View Dibben's Profile")**
- [![Dibben's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6788-dibben "View Dibben's Profile") Topic Author
- [ Offline](/forum/user/6788-dibben)

Less More

- Posts: 377
- Thank you received: 7
-
-

12 years 3 months ago [\#166408](#166408) by [Dibben](/forum/user/6788-dibben "View Dibben's Profile")  *[description not showing in email or pdf variants](/forum/4-how-to/870170-description-not-showing-in-email-or-pdf-variants#166408 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.0 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Product description not showing in email when product has variants  Hi, I have this code for the emails that shows the product description in the email when the customer buys a product. However when the product has a variant this doesn't show. Do you know why this would be? Do i need to add the description to each variant also?  This is the pdf code i use... this shows but not when the product has a variant...  Kind regards  Alex")* was created by *[Dibben](/forum/user/6788-dibben "View Dibben's Profile")*

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.0
-- PHP version -- : 5.4
-- Error-message(debug-mod must be tuned on) -- : Product description not showing in email when product has variants

Hi,
I have this code for the emails that shows the product description in the email when the customer buys a product. However when the product has a variant this doesn't show. Do you know why this would be? Do i need to add the description to each variant also?
Code:

&lt;!-- {terms and conditions info} --&gt; &lt;table width="100%" border="0"&gt; &lt;tr&gt; &lt;td&gt; &lt;h1 style="background-color:#333;font-size:14px;width:560px;padding:5px; text-align:center; color:#fff; font-family:Arial, Helvetica, sans-serif;"&gt;FULL DETAILS / T&amp;C's / HOW TO REDEEM&lt;/h1&gt; &lt;p style="font-size:10px;"&gt;&lt;br/&gt; &lt;?php $productClass = hikashop_get('class.product'); foreach($data-&gt;cart-&gt;products as $item){ $product = $productClass-&gt;get($item-&gt;product_id); echo $item-&gt;order_product_name.'&lt;strong&gt;&lt;/strong&gt;'; echo $product-&gt;product_description.'&lt;br/&gt;&lt;hr&gt;&lt;br/&gt;'; } ?&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;!-- { end terms and conditions info} --&gt;

This is the pdf code i use... this shows but not when the product has a variant...
Code:

&lt;table width="100%" border="0"&gt; &lt;tr&gt; &lt;td&gt; &lt;h1 style="background-color:#333;font-size:14px;padding:5px; text-align:center; color:#fff; font-family:Arial, Helvetica, sans-serif;"&gt;Full Details / T&amp;C's / How to Redeem...&lt;/h1&gt; &lt;p style="font-size:10px;"&gt;&lt;br/&gt; &lt;?php $productClass = hikashop_get('class.product'); foreach($order-&gt;products as $item){ $product = $productClass-&gt;get($item-&gt;product_id); echo $item-&gt;order_product_name.'&lt;strong&gt;&lt;/strong&gt;'; echo $product-&gt;product_description.'&lt;br/&gt;&lt;hr&gt;&lt;br/&gt;'; } ?&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;

Kind regards

Alex

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDE3MC1kZXNjcmlwdGlvbi1ub3Qtc2hvd2luZy1pbi1lbWFpbC1vci1wZGYtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

12 years 3 months ago [\#166417](#166417) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[description not showing in email or pdf variants](/forum/4-how-to/870170-description-not-showing-in-email-or-pdf-variants#166417 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.0 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Product description not showing in email when product has variants  Hi, I have this code for the emails that shows the product description in the email when the customer buys a product. However when the product has a variant this doesn't show. Do you know why this would be? Do i need to add the description to each variant also?  This is the pdf code i use... this shows but not when the product has a variant...  Kind regards  Alex")*

Hi,

That's normal since you entered the description only in the main product, not in each variant.
If you want that code to work with variants too, you'll have to make it more complex. Something like that: Code:

&lt;?php $productClass = hikashop_get('class.product'); foreach($order-&gt;products as $item){ $product = $productClass-&gt;get($item-&gt;product_id); echo $item-&gt;order_product_name.'&lt;strong&gt;&lt;/strong&gt;'; if($product-&gt;product_type=='variant'){ $product = $productClass-&gt;get($product-&gt;product_parent_id); } echo $product-&gt;product_description.'&lt;br/&gt;&lt;hr&gt;&lt;br/&gt;'; } ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDE3MC1kZXNjcmlwdGlvbi1ub3Qtc2hvd2luZy1pbi1lbWFpbC1vci1wZGYtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Dibben](/forum/user/6788-dibben "View Dibben's Profile")**
- [![Dibben's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6788-dibben "View Dibben's Profile") Topic Author
- [ Offline](/forum/user/6788-dibben)

Less More

- Posts: 377
- Thank you received: 7
-
-

12 years 3 months ago [\#166440](#166440) by [Dibben](/forum/user/6788-dibben "View Dibben's Profile")  Replied by *[Dibben](/forum/user/6788-dibben "View Dibben's Profile")* on topic *[description not showing in email or pdf variants](/forum/4-how-to/870170-description-not-showing-in-email-or-pdf-variants#166440 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.0 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Product description not showing in email when product has variants  Hi, I have this code for the emails that shows the product description in the email when the customer buys a product. However when the product has a variant this doesn't show. Do you know why this would be? Do i need to add the description to each variant also?  This is the pdf code i use... this shows but not when the product has a variant...  Kind regards  Alex")*

Aha i see, I didnt know if the value of the main product was the default if no other was entered in the variant. I have added this to the email and it seems to work really well. The PDF on the other hand still wont generate on products with variants, even if i take out the code I added about the product description. This is the code i am using in the invoice.php file please can you see if it works for you when someone buys a product with a variant?
Code:

&lt;?php /** * @copyright Copyright (C) 2009-2012 ACYBA SARL - All rights reserved. * @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL */ defined('_JEXEC') or die('Restricted access'); ?&gt; &lt;style type="text/css"&gt; &lt;!-- .invoicetitle{ text-align:center;font-size:30px; padding-top:40px;padding-bottom:40px} legend { padding:5px 10px; background-color:#5471B5;color:white;font-weight:bold;border-color:#ccc} fieldset { padding:10px; border-color:#ccc;} div.date{text-align:right;color:#333;} .storeaddress{ color:#333; } .addresses{padding-top:50px;} .addresses td{padding-left:50px;} .addresses fieldset {float:left;} table.products{margin:auto;margin-top:60px;width:580px;border-collapse:collapse} .price{text-align:center;} .products td, .products th{border:1px solid #ccc;padding:7px 4px;} .products th{background-color:#5471B5;color:white;} td.newarea{text-align:right;padding-right:20px;} tr.total{font-weight:bold;} .products tr.limitation td{background-color:#ccc;padding:1px 0px;} .hikashop_order_custom_fields_fieldset{margin-top : 20px;} .footer{font-size:10px;color:#aaa;text-align:center;} --&gt; &lt;/style&gt; &lt;page style="font-size: 12px" backtop="14mm" backbottom="14mm" backleft="10mm" backright="10mm"&gt; &lt;page_footer&gt; &lt;div class="footer"&gt; &lt;?php echo str_replace(array("\r\n","\n","\r"),array('&lt;br/&gt;','&lt;br/&gt;','&lt;br/&gt;'),$this-&gt;params-&gt;get('footer')); ?&gt; &lt;/div&gt; &lt;/page_footer&gt; &lt;div class="storeaddress"&gt; &lt;!--&lt;?php $store = str_replace(array("\r\n","\n","\r"),array('&lt;br/&gt;','&lt;br/&gt;','&lt;br/&gt;'),$config-&gt;get('store_address','')); if(JText::_($store)!=$store){ $store = JText::_($store); } echo $store; ?&gt;--&gt; &lt;/div&gt; &lt;?php if(empty($order-&gt;order_invoice_number)){ $order-&gt;order_invoice_number = $order-&gt;order_number; } if(empty($order-&gt;order_invoice_created)){ $order-&gt;order_invoice_created = $order-&gt;order_created; } ?&gt; &lt;div style="margin-left:auto; margin-right:auto; margin-top:-30px;"&gt;&lt;p style="text-align:center;"&gt;&lt;img class="w600" src="images/voucher-pdf-header.png" border="0" alt="" /&gt;&lt;/p&gt;&lt;/div&gt; &lt;div class="invoicetitle" style="font-size:24px;"&gt;Voucher Code: &lt;?php echo $order-&gt;order_invoice_number; ?&gt;&lt;/div&gt; &lt;div class="date" style="margin-bottom:-20px; margin-top:-20px;"&gt;&lt;p style="text-align:center;"&gt;&lt;?php echo JText::_('DATE').' Purchased: '.hikashop_getDate($order-&gt;order_invoice_created,'%d %B %Y ');?&gt;&lt;/p&gt; &lt;p style="text-align:center;"&gt;Please quote your voucher code when contacting the venue to redeem. If you have purchased more than one deal the same code will be valid multiple times.&lt;/p&gt; &lt;/div&gt; &lt;!--&lt;table class="addresses"&gt; &lt;tr&gt; &lt;?php $addresses = array('billing_address','shipping_address'); foreach($addresses as $oneAddress){ if(empty($order-&gt;$oneAddress)) continue; if ($oneAddress=='shipping_address' &amp;&amp; empty($pluginsShipping)) continue; ?&gt; &lt;td valign="top"&gt; &lt;fieldset&gt; &lt;legend&gt;&lt;?php echo JText::_('HIKASHOP_'.strtoupper($oneAddress)); ?&gt;&lt;/legend&gt; &lt;?php if(!empty($order-&gt;$oneAddress-&gt;address_company)) echo $order-&gt;$oneAddress-&gt;address_company.'&lt;br/&gt;'; echo $order-&gt;$oneAddress-&gt;address_title.' '.$order-&gt;$oneAddress-&gt;address_firstname.' '.$order-&gt;$oneAddress-&gt;address_lastname.'&lt;br/&gt;'; echo $order-&gt;$oneAddress-&gt;address_street.'&lt;br/&gt;'; echo $order-&gt;$oneAddress-&gt;address_post_code.' '.$order-&gt;$oneAddress-&gt;address_city.' '.$order-&gt;$oneAddress-&gt;address_state.'&lt;br/&gt;'; echo $order-&gt;$oneAddress-&gt;address_country.'&lt;br/&gt;'; if(!empty($order-&gt;$oneAddress-&gt;address_telephone)) echo JText::sprintf('TELEPHONE_IN_ADDRESS',$order-&gt;$oneAddress-&gt;address_telephone).'&lt;br/&gt;'; if(!empty($order-&gt;$oneAddress-&gt;address_vat)) echo JText::_('VAT_NUMBER').' : '.$order-&gt;$oneAddress-&gt;address_vat.'&lt;br/&gt;'; ?&gt; &lt;/fieldset&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;/tr&gt; &lt;/table&gt;--&gt; &lt;table class="products"&gt; &lt;tr class="products_title"&gt; &lt;th style="width:300px; background-color:#FF8811;"&gt; &lt;?php echo JText::_('PRODUCT'); ?&gt; &lt;/th&gt; &lt;th style="width:100px; background-color:#333;" class="price"&gt; &lt;?php echo JText::_('UNIT_PRICE'); ?&gt; &lt;/th&gt; &lt;th style="width:80px; background-color:#333;" class="price"&gt; &lt;?php echo JText::_('PRODUCT_QUANTITY'); ?&gt; &lt;/th&gt; &lt;th style="width:100px; background-color:#333;" class="price"&gt; &lt;?php echo JText::_('PRICE'); ?&gt; &lt;/th&gt; &lt;/tr&gt; &lt;?php if(hikashop_level(2)){ $fieldsClass = hikashop_get('class.field'); $null = null; $itemFields = $fieldsClass-&gt;getFields('frontcomp',$null,'item'); } $group = $config-&gt;get('group_options',0); foreach($order-&gt;products as $product){ if($group &amp;&amp; $product-&gt;order_product_option_parent_id) continue; ?&gt; &lt;tr&gt; &lt;td&gt; &lt;?php echo implode('&lt;br/&gt;',$this-&gt;str_split_unicode($product-&gt;order_product_name,50)); if($group){ $display_item_price=false; foreach($order-&gt;products as $j =&gt; $optionElement){ if($optionElement-&gt;order_product_option_parent_id != $product-&gt;order_product_id) continue; if($optionElement-&gt;order_product_price&gt;0){ $display_item_price = true; } } if($display_item_price){ if($config-&gt;get('price_with_tax')){ echo ' '.$currencyHelper-&gt;format($product-&gt;order_product_price+$product-&gt;order_product_tax,$order-&gt;order_currency_id); }else{ echo ' '.$currencyHelper-&gt;format($product-&gt;order_product_price,$order-&gt;order_currency_id); } } } if(!empty($fields['item'])){ foreach($fields['item'] as $field){ $namekey = $field-&gt;field_namekey; if(empty($product-&gt;$namekey)) continue; echo '&lt;p&gt;'.$fieldsClass-&gt;getFieldName($field).': '.$fieldsClass-&gt;show($field,$product-&gt;$namekey).'&lt;/p&gt;'; } } if($group){ foreach($order-&gt;products as $j =&gt; $optionElement){ if($optionElement-&gt;order_product_option_parent_id != $product-&gt;order_product_id) continue; $product-&gt;order_product_price +=$optionElement-&gt;order_product_price; $product-&gt;order_product_tax +=$optionElement-&gt;order_product_tax; $product-&gt;order_product_total_price+=$optionElement-&gt;order_product_total_price; $product-&gt;order_product_total_price_no_vat+=$optionElement-&gt;order_product_total_price_no_vat; ?&gt;&lt;br/&gt;&lt;?php echo $optionElement-&gt;order_product_name; if($optionElement-&gt;order_product_price&gt;0){ if($config-&gt;get('price_with_tax')){ echo ' ( + '.$currencyHelper-&gt;format($optionElement-&gt;order_product_price+$optionElement-&gt;order_product_tax,$order-&gt;order_currency_id).' )'; }else{ echo ' ( + '.$currencyHelper-&gt;format($optionElement-&gt;order_product_price,$order-&gt;order_currency_id).' )'; } } } } ?&gt; &lt;/td&gt; &lt;td class="price"&gt; &lt;?php if($config-&gt;get('price_with_tax')){ echo $currencyHelper-&gt;format($product-&gt;order_product_price+$product-&gt;order_product_tax,$order-&gt;order_currency_id); }else{ echo $currencyHelper-&gt;format($product-&gt;order_product_price,$order-&gt;order_currency_id); } ?&gt; &lt;/td&gt; &lt;td class="price"&gt; &lt;?php echo $product-&gt;order_product_quantity;?&gt; &lt;/td&gt; &lt;td class="price"&gt; &lt;?php if($config-&gt;get('price_with_tax')){ echo $currencyHelper-&gt;format($product-&gt;order_product_total_price,$order-&gt;order_currency_id); }else{ echo $currencyHelper-&gt;format($product-&gt;order_product_total_price_no_vat,$order-&gt;order_currency_id); } ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;tr class="limitation"&gt;&lt;td colspan="4"&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td colspan="3" class="newarea"&gt; &lt;?php echo JText::_( 'SUBTOTAL' ); ?&gt; &lt;/td&gt; &lt;td class="price"&gt; &lt;?php if($config-&gt;get('price_with_tax')){ echo $currencyHelper-&gt;format($order-&gt;order_subtotal,$order-&gt;order_currency_id); }else{ echo $currencyHelper-&gt;format($order-&gt;order_subtotal_no_vat,$order-&gt;order_currency_id); } ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php $taxes = $order-&gt;order_subtotal - $order-&gt;order_subtotal_no_vat - $order-&gt;order_discount_tax + $order-&gt;order_shipping_tax;; if(!empty($order-&gt;order_discount_code)){ ?&gt; &lt;tr&gt; &lt;td colspan="3" class="newarea"&gt; &lt;?php echo JText::_( 'HIKASHOP_COUPON' ); ?&gt; &lt;/td&gt; &lt;td class="price"&gt; &lt;?php if($config-&gt;get('price_with_tax')){ echo $currencyHelper-&gt;format($order-&gt;order_discount_price*-1,$order-&gt;order_currency_id); }else{ echo $currencyHelper-&gt;format(($order-&gt;order_discount_price-@$order-&gt;order_discount_tax)*-1,$order-&gt;order_currency_id); } ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } if(!empty($order-&gt;order_shipping_method)){ ?&gt; &lt;tr&gt; &lt;td colspan="3" class="newarea"&gt; &lt;?php echo JText::_( 'SHIPPING' ); ?&gt; &lt;/td&gt; &lt;td class="price" &gt; &lt;?php if($config-&gt;get('price_with_tax')){ echo $currencyHelper-&gt;format($order-&gt;order_shipping_price,$order-&gt;order_currency_id); }else{ echo $currencyHelper-&gt;format($order-&gt;order_shipping_price-@$order-&gt;order_shipping_tax,$order-&gt;order_currency_id); } ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } if(!empty($order-&gt;additional)) { $exclude_additionnal = explode(',', $config-&gt;get('order_additional_hide', '')); foreach($order-&gt;additional as $additional) { if(in_array($additional-&gt;name, $exclude_additionnal)) continue; echo '&lt;tr&gt;&lt;td colspan="3" class="newarea"&gt;'. JText::_($additional-&gt;order_product_name).'&lt;/td&gt;&lt;td class="price"&gt;'; if(!empty($additional-&gt;order_product_price) &#124;&#124; empty($additionaltionnal-&gt;order_product_options)) { if($config-&gt;get('price_with_tax')){ echo $currencyHelper-&gt;format($additional-&gt;order_product_price+@$additional-&gt;order_product_tax, $order-&gt;order_currency_id); }else{ echo $currencyHelper-&gt;format($additional-&gt;order_product_price, $order-&gt;order_currency_id); } } else { echo $additional-&gt;order_product_options; } echo '&lt;/td&gt;&lt;/tr&gt;'; } } if($taxes != 0){ if($config-&gt;get('detailed_tax_display') &amp;&amp; !empty($order-&gt;order_tax_info)){ foreach($order-&gt;order_tax_info as $tax){ ?&gt; &lt;tr&gt; &lt;td colspan="3" class="newarea"&gt; &lt;?php echo $tax-&gt;tax_namekey; ?&gt; &lt;/td&gt; &lt;td class="price"&gt; &lt;?php echo $currencyHelper-&gt;format($tax-&gt;tax_amount,$order-&gt;order_currency_id); ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } }else{ ?&gt; &lt;tr&gt; &lt;td colspan="3" class="newarea"&gt; &lt;?php echo JText::_( 'VAT' ); ?&gt; &lt;/td&gt; &lt;td class="price"&gt; &lt;?php echo $currencyHelper-&gt;format($taxes,$order-&gt;order_currency_id); ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } } ?&gt; &lt;?php if(!empty($order-&gt;order_payment_method) &amp;&amp; $order-&gt;order_payment_price != 0){ ?&gt; &lt;tr&gt; &lt;td colspan="3" class="newarea"&gt; &lt;?php echo JText::_( 'HIKASHOP_PAYMENT' ); ?&gt; &lt;/td&gt; &lt;td class="price" &gt; &lt;?php echo $currencyHelper-&gt;format($order-&gt;order_payment_price,$order-&gt;order_currency_id); ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;tr class="total"&gt; &lt;td colspan="3" class="newarea"&gt; &lt;?php echo JText::_( 'HIKASHOP_TOTAL' ); ?&gt; &lt;/td&gt; &lt;td class="price" &gt; &lt;?php echo $currencyHelper-&gt;format($order-&gt;order_full_price,$order-&gt;order_currency_id); ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;table width="100%" border="0"&gt; &lt;tr&gt; &lt;td&gt; &lt;h1 style="background-color:#333;font-size:14px;padding:5px; text-align:center; color:#fff; font-family:Arial, Helvetica, sans-serif;"&gt;Full Details / T&amp;C's / How to Redeem...&lt;/h1&gt; &lt;p style="font-size:10px;"&gt;&lt;br/&gt; &lt;?php $productClass = hikashop_get('class.product'); foreach($order-&gt;products as $item){ $product = $productClass-&gt;get($item-&gt;product_id); echo $item-&gt;order_product_name.'&lt;strong&gt;&lt;/strong&gt;'; if($product-&gt;product_type=='variant'){ $product = $productClass-&gt;get($product-&gt;product_parent_id); } echo $product-&gt;product_description.'&lt;br/&gt;&lt;hr&gt;&lt;br/&gt;'; } ?&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;p&gt; &lt;?php if (!empty($pluginsShipping)) echo JText::_('HIKASHOP_SHIPPING_METHOD').' : '.$pluginsShipping-&gt;getName($order-&gt;order_shipping_method, $order-&gt;order_shipping_id).'&lt;br/&gt;' ; if(!empty($pluginsPayment)) echo JText::_('HIKASHOP_PAYMENT_METHOD').' : '.$pluginsPayment-&gt;getName($order-&gt;order_payment_method, $order-&gt;order_payment_id).'&lt;br/&gt;'; ?&gt; &lt;/p&gt; &lt;br/&gt; &lt;?php if(hikashop_level(2) &amp;&amp; !empty($fields['order'])){?&gt; &lt;fieldset class="hikashop_order_custom_fields_fieldset"&gt; &lt;legend&gt;&lt;?php echo JText::_('ADDITIONAL_INFORMATION'); ?&gt;&lt;/legend&gt; &lt;table class="hikashop_order_custom_fields_table adminlist" cellpadding="1" width="100%"&gt; &lt;?php foreach($fields['order'] as $fieldName =&gt; $oneExtraField) { if(!@$oneExtraField-&gt;field_frontcomp &#124;&#124; empty($order-&gt;$fieldName)) continue; ?&gt; &lt;tr class="hikashop_order_custom_field_&lt;?php echo $fieldName;?&gt;_line"&gt; &lt;td class="key"&gt; &lt;?php echo $fieldsClass-&gt;getFieldName($oneExtraField);?&gt; &lt;/td&gt; &lt;td&gt; &lt;?php echo $fieldsClass-&gt;show($oneExtraField,$order-&gt;$fieldName); ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;/table&gt; &lt;/fieldset&gt; &lt;br/&gt; &lt;?php } ?&gt; &lt;div style="margin-left:auto; margin-right:auto; margin-top:0px;"&gt;&lt;p style="text-align:center;"&gt;&lt;img class="w600" src="images/voucher-footer-pdf.png" border="0" alt="" /&gt;&lt;/p&gt;&lt;/div&gt; &lt;/page&gt;

Kind regards

Alex

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDE3MC1kZXNjcmlwdGlvbi1ub3Qtc2hvd2luZy1pbi1lbWFpbC1vci1wZGYtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

12 years 3 months ago [\#166450](#166450) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[description not showing in email or pdf variants](/forum/4-how-to/870170-description-not-showing-in-email-or-pdf-variants#166450 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.0 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Product description not showing in email when product has variants  Hi, I have this code for the emails that shows the product description in the email when the customer buys a product. However when the product has a variant this doesn't show. Do you know why this would be? Do i need to add the description to each variant also?  This is the pdf code i use... this shows but not when the product has a variant...  Kind regards  Alex")*

Hi,

Maybe it's because of the &lt;hr&gt; tag as it should be &lt;hr/&gt; ?
The best is to go back to the default code of the plugin (that you have in the package of the plugin and try again with it. It should work. If not, then there is an issue with the HTML of the products with variants on your website.
In that case, try to remove the line:
echo implode('&lt;br/&gt;',$this-&gt;str_split_unicode($product-&gt;order_product_name,50));
That's what displays the product name. If it works without it, then the problem is with the product names of variants.
In that case, try like that instead:
echo implode('&lt;br/&gt;',$this-&gt;str_split_unicode(strip_tags($product-&gt;order_product_name),50));

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDE3MC1kZXNjcmlwdGlvbi1ub3Qtc2hvd2luZy1pbi1lbWFpbC1vci1wZGYtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Dibben](/forum/user/6788-dibben "View Dibben's Profile")**
- [![Dibben's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6788-dibben "View Dibben's Profile") Topic Author
- [ Offline](/forum/user/6788-dibben)

Less More

- Posts: 377
- Thank you received: 7
-
-

12 years 3 months ago [\#166555](#166555) by [Dibben](/forum/user/6788-dibben "View Dibben's Profile")  Replied by *[Dibben](/forum/user/6788-dibben "View Dibben's Profile")* on topic *[description not showing in email or pdf variants](/forum/4-how-to/870170-description-not-showing-in-email-or-pdf-variants#166555 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.0 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Product description not showing in email when product has variants  Hi, I have this code for the emails that shows the product description in the email when the customer buys a product. However when the product has a variant this doesn't show. Do you know why this would be? Do i need to add the description to each variant also?  This is the pdf code i use... this shows but not when the product has a variant...  Kind regards  Alex")*

Hi Nicolas,

The default code didn't work however when i replace the line you mentioned it now works so thanks for your help. I guess that this would apply to anyone who uses this plugin.

Kind regards

Alex

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDE3MC1kZXNjcmlwdGlvbi1ub3Qtc2hvd2luZy1pbi1lbWFpbC1vci1wZGYtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

12 years 3 months ago [\#166571](#166571) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[description not showing in email or pdf variants](/forum/4-how-to/870170-description-not-showing-in-email-or-pdf-variants#166571 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.0 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Product description not showing in email when product has variants  Hi, I have this code for the emails that shows the product description in the email when the customer buys a product. However when the product has a variant this doesn't show. Do you know why this would be? Do i need to add the description to each variant also?  This is the pdf code i use... this shows but not when the product has a variant...  Kind regards  Alex")*

Hi,

Yes, we'll publish a new version of the plugin with the change.

The following user(s) said Thank You: [Dibben](/forum/user/6788-dibben "View Dibben's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDE3MC1kZXNjcmlwdGlvbi1ub3Qtc2hvd2luZy1pbi1lbWFpbC1vci1wZGYtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Dibben](/forum/user/6788-dibben "View Dibben's Profile")**
- [![Dibben's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6788-dibben "View Dibben's Profile") Topic Author
- [ Offline](/forum/user/6788-dibben)

Less More

- Posts: 377
- Thank you received: 7
-
-

12 years 3 months ago [\#166919](#166919) by [Dibben](/forum/user/6788-dibben "View Dibben's Profile")  Replied by *[Dibben](/forum/user/6788-dibben "View Dibben's Profile")* on topic *[description not showing in email or pdf variants](/forum/4-how-to/870170-description-not-showing-in-email-or-pdf-variants#166919 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.0 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Product description not showing in email when product has variants  Hi, I have this code for the emails that shows the product description in the email when the customer buys a product. However when the product has a variant this doesn't show. Do you know why this would be? Do i need to add the description to each variant also?  This is the pdf code i use... this shows but not when the product has a variant...  Kind regards  Alex")*

Hi Nicolas,

I am pretty certain i have not changed the PDF php in anyway but now i cannot send confirmation email and get the message:

TCPDF ERROR: Could not include font definition file: 'arial'

The customer also gets this when trying to download their PDF do you have any ideas?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDE3MC1kZXNjcmlwdGlvbi1ub3Qtc2hvd2luZy1pbi1lbWFpbC1vci1wZGYtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Dibben](/forum/user/6788-dibben "View Dibben's Profile")**
- [![Dibben's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6788-dibben "View Dibben's Profile") Topic Author
- [ Offline](/forum/user/6788-dibben)

Less More

- Posts: 377
- Thank you received: 7
-
-

12 years 3 months ago [\#166920](#166920) by [Dibben](/forum/user/6788-dibben "View Dibben's Profile")  Replied by *[Dibben](/forum/user/6788-dibben "View Dibben's Profile")* on topic *[description not showing in email or pdf variants](/forum/4-how-to/870170-description-not-showing-in-email-or-pdf-variants#166920 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.0 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Product description not showing in email when product has variants  Hi, I have this code for the emails that shows the product description in the email when the customer buys a product. However when the product has a variant this doesn't show. Do you know why this would be? Do i need to add the description to each variant also?  This is the pdf code i use... this shows but not when the product has a variant...  Kind regards  Alex")*

I know what is happening here, it looks like where we used some styling in the product description it was trying to pull this into the PDF so that seemed to be throwing up the error so i guess we need to use no custom css styling on the product descriptions.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDE3MC1kZXNjcmlwdGlvbi1ub3Qtc2hvd2luZy1pbi1lbWFpbC1vci1wZGYtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

12 years 3 months ago [\#166951](#166951) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[description not showing in email or pdf variants](/forum/4-how-to/870170-description-not-showing-in-email-or-pdf-variants#166951 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.0 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Product description not showing in email when product has variants  Hi, I have this code for the emails that shows the product description in the email when the customer buys a product. However when the product has a variant this doesn't show. Do you know why this would be? Do i need to add the description to each variant also?  This is the pdf code i use... this shows but not when the product has a variant...  Kind regards  Alex")*

Yes, if you include extra fonts with inline CSS, the font need to be registered with the TCPD library. So it's better not to do that and only define onts via CSS code in your template/hikashop frontend CSS file, not directly inline in the descriptions.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDE3MC1kZXNjcmlwdGlvbi1ub3Qtc2hvd2luZy1pbi1lbWFpbC1vci1wZGYtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Dibben](/forum/user/6788-dibben "View Dibben's Profile")**
- [![Dibben's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6788-dibben "View Dibben's Profile") Topic Author
- [ Offline](/forum/user/6788-dibben)

Less More

- Posts: 377
- Thank you received: 7
-
-

12 years 3 months ago [\#166993](#166993) by [Dibben](/forum/user/6788-dibben "View Dibben's Profile")  Replied by *[Dibben](/forum/user/6788-dibben "View Dibben's Profile")* on topic *[description not showing in email or pdf variants](/forum/4-how-to/870170-description-not-showing-in-email-or-pdf-variants#166993 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.0 -- PHP version -- : 5.4 -- Error-message(debug-mod must be tuned on) -- : Product description not showing in email when product has variants  Hi, I have this code for the emails that shows the product description in the email when the customer buys a product. However when the product has a variant this doesn't show. Do you know why this would be? Do i need to add the description to each variant also?  This is the pdf code i use... this shows but not when the product has a variant...  Kind regards  Alex")*

I see what i have done is updated jce editor to strip out span styles by default to prevent customers in hikamarket pasting content from word.

Kind regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3MDE3MC1kZXNjcmlwdGlvbi1ub3Qtc2hvd2luZy1pbi1lbWFpbC1vci1wZGYtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.071 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
