我使用Joomla的VirtueMart 2.0.10! 2.5.6和我的问题是每个产品的自动生成的pdf文件不包括我的自定义字段。我不是PHP的专家,但我认为,在文件theese行/components/com_virtuemart/views/productdetails/tmpl/default_pdf.php有事情做吧,开始行145:virtuemart 2产品pdf不显示自定义字段
<?php // Product custom_fields TODO relation to Childs
if (!empty($this->product->customfields)) { ?>
<div class="product-fields">
<?php
$custom_title = null ;
foreach ($this->product->customfields as $field){
?><div style="display:inline-block;" class="product-field product-field-type-<?php echo $field->field_type ?>">
<?php if ($field->custom_title != $custom_title) { ?>
<span class="product-fields-title" ><strong><?php echo JText::_($field->custom_title); ?></strong></span>
<?php //echo JHTML::tooltip($field->custom_tip, $field->custom_title, 'tooltip.png');
} ?>
<span class="product-field-display"><?php echo $field->display ?></span>
<span class="product-field-desc"><?php echo jText::_($field->custom_field_desc) ?></span>
</div>
<?php
$custom_title = $field->custom_title;
} ?>
</div>
<?php
} // Product custom_fields END ?>
我测试在上面的if语句和它的executetd之后添加一个else语句来回显一些文本。所以显然没有自定义字段...但真的有...
我还没有发现任何其他人遇到这个问题,我认为这很奇怪,但我不认为我搞砸了。我已对/components/com_virtuemart/views/productdetails/tmpl/default.php文件进行了一些更改。