本文整理汇总了PHP中ps_product::show_image方法的典型用法代码示例。如果您正苦于以下问题:PHP ps_product::show_image方法的具体用法?PHP ps_product::show_image怎么用?PHP ps_product::show_image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ps_product
的用法示例。
在下文中一共展示了ps_product::show_image方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$db->next_record();
echo "<h3>" . $VM_LANG->_('PHPSHOP_AVAILABLE_IMAGES') . " " . $db->f("product_name") . "</h3>\n";
if (!$pop) {
echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=shop.product_details&flypage={$flypage}&product_id={$product_id}&Itemid={$Itemid}\">" . $VM_LANG->_('PHPSHOP_BACK_TO_DETAILS') . "</a>";
} else {
echo '<a href="#" onclick="javascript: window.close();">' . $VM_LANG->_('PROMPT_CLOSE') . '</a>';
}
echo '<br/><br/><br/>';
$alt = $db->f("product_name");
$height = PSHOP_IMG_HEIGHT;
$width = PSHOP_IMG_WIDTH;
$border = $image_id == "product" ? "4" : "1";
$href = $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page={$page}&product_id={$product_id}&image_id=product&Itemid=" . $Itemid . '&pop=' . $pop;
$title = $db->f("product_name");
echo "<a href=\"{$href}\" target=\"_self\" title=\"{$title}\">\n";
$ps_product->show_image($db->f("product_thumb_image"), "alt=\"{$alt}\" align=\"center\" border=\"{$border}\"");
echo "</a> ";
$dbi = new ps_DB();
// Let's have a look wether the product has more images.
$dbi->query("SELECT * FROM #__{vm}_product_files WHERE file_product_id='{$product_id}' AND file_is_image='1'");
$images = $dbi->record;
$i = 0;
foreach ($images as $image) {
$info = pathinfo($image->file_name);
$base_filename = basename($image->file_name, "." . $info["extension"]) . "_" . $image->file_image_thumb_height . "x" . $image->file_image_thumb_width . "." . $info["extension"];
$thumb = $mosConfig_absolute_path . '/' . $info["dirname"] . "/resized/" . $base_filename;
$thumburl = str_replace($mosConfig_absolute_path, $mosConfig_live_site, $thumb);
$alt = $image->file_title;
$height = empty($image->file_image_thumb_height) ? PSHOP_IMG_HEIGHT : $image->file_image_thumb_height;
$width = empty($image->file_image_thumb_width) ? PSHOP_IMG_WIDTH : $image->file_image_thumb_width;
$border = $image->file_id == $image_id ? "4" : "1";