本文整理匯總了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";