本文整理匯總了PHP中producthelper::getCategoryCompareTemplate方法的典型用法代碼示例。如果您正苦於以下問題:PHP producthelper::getCategoryCompareTemplate方法的具體用法?PHP producthelper::getCategoryCompareTemplate怎麽用?PHP producthelper::getCategoryCompareTemplate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類producthelper
的用法示例。
在下文中一共展示了producthelper::getCategoryCompareTemplate方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: producthelper
$url = JURI::base();
// Get product helper
require_once JPATH_ROOT . '/components/com_redshop/helpers/product.php';
require_once JPATH_SITE . '/components/com_redshop/helpers/extra_field.php';
$producthelper = new producthelper();
$print = $this->input->getBool('print', false);
$user = JFactory::getUser();
$pagetitle = JText::_('COM_REDSHOP_COMPARE_PRODUCTS');
$config = new Redconfiguration();
$compare = $producthelper->getCompare();
$stockroomhelper = new rsstockroomhelper();
if (PRODUCT_COMPARISON_TYPE == 'category') {
$compare_product = $this->session->get('compare_product');
$catid = $compare_product[0]['category_id'];
$cid = $this->input->getInt('cid', null);
$template_id = $producthelper->getCategoryCompareTemplate($catid);
if ($template_id == "") {
$compare_template = $this->redTemplate->getTemplate("compare_product", COMPARE_TEMPLATE_ID);
} else {
$compare_template = $this->redTemplate->getTemplate("compare_product", $template_id);
}
} else {
$compare_template = $this->redTemplate->getTemplate("compare_product", COMPARE_TEMPLATE_ID);
}
if (count($compare_template) > 0 && $compare_template[0]->template_desc != "") {
$template = $compare_template[0]->template_desc;
} else {
$template = "<div><span>{compare_product_heading}</span></div><div><a href=\"{returntocategory_link}\">{returntocategory_name}</a></div><table border=\"1\"><tbody><tr><th> </th><td align=\"center\">{expand_collapse}</td></tr><tr><th>Product Name</th><td>{product_name}</td></tr><tr><th>Image</th><td>{product_image}</td></tr><tr><th>Manufacturer</th><td>{manufacturer_name}</td></tr><tr><th>Discount Start <br /></th><td>{discount_start_date}</td></tr><tr><th>Discount End<br /></th><td>{discount_end_date}</td></tr><tr><th>Price</th><td>{product_price}</td></tr><tr><th>Short Desc<br /></th><td>{product_s_desc}</td></tr><tr><th>Desc</th><td>{product_desc}</td></tr><tr><th>Rating</th><td>{product_rating_summary}</td></tr><tr><th>Delivery Time</th><td>{product_delivery_time}</td></tr><tr><th>Product Number<br /></th><td>{product_number}</td></tr><tr><th>Stock<br /></th><td>{products_in_stock}</td></tr><tr><th>Stock<br /></th><td>{product_stock_amount_image}</td></tr><tr><th>Weight<br /></th><td>{product_weight}</td></tr><tr><th>Length<br /></th><td>{product_length}</td></tr><tr><th>Height<br /></th><td>{product_height}</td></tr><tr><th>Width<br /></th><td>{product_width}</td></tr><tr><th>Availability Date<br /></th><td>{product_availability_date}</td></tr><tr><th>Volume<br /></th><td>{product_volume}</td></tr><tr><th>Category<br /></th><td>{product_category}</td></tr><tr><th> </th><td>{remove}</td></tr><tr><th> </th><td>{add_to_cart}</td></tr></tbody></table>";
}
$template = str_replace('{compare_product_heading}', $pagetitle, $template);
if (isset($compare['idx']) && $compare['idx'] == 1) {