0
如何仅在相关产品区域显示产品缩略图,我当前的代码也显示链接,即image
带有产品名称的href标签。我只想显示缩略图joomla中的相关产品
<?php
foreach($this->product->customfieldsRelatedProducts as $field) {
echo $field->display;
}
?>
如何仅在相关产品区域显示产品缩略图,我当前的代码也显示链接,即image
带有产品名称的href标签。我只想显示缩略图joomla中的相关产品
<?php
foreach($this->product->customfieldsRelatedProducts as $field) {
echo $field->display;
}
?>
我认为代码会帮助你。
<?php
$image_dir = JURI::root()."images/";
foreach($this->product->customfieldsRelatedProducts as $field) {
echo $field->display;
?>
<img src="<?php echo $image_dir.$field->image; ?>" alt="<?php echo $field->title ?>" />
<?php
}
?>
同样的结果,没有任何反应 –
<?PHP的 \t的foreach($这 - >产品 - > customfieldsRelatedProducts为$字段){ \t $现场>显示= preg_replace函数('#()。*? ()#','$ 1 $ 2',$ field-> display); \t?> <?PHP回声$现场>显示?> \t \t –