本文整理汇总了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) {