本文整理汇总了PHP中Mage_Catalog_Block_Product_List::_toHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Catalog_Block_Product_List::_toHtml方法的具体用法?PHP Mage_Catalog_Block_Product_List::_toHtml怎么用?PHP Mage_Catalog_Block_Product_List::_toHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Catalog_Block_Product_List
的用法示例。
在下文中一共展示了Mage_Catalog_Block_Product_List::_toHtml方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _toHtml
/**
* Get HTML if there's anything to show
*/
protected function _toHtml()
{
if ($this->_getProductCollection()->count()) {
return parent::_toHtml();
}
return '';
}
示例2:
function _toHtml()
{
if(!$this->_config['show']) return;
$this->__renderSlideShowImages();
$this->assign('configs', $this->_config);
$this->setTemplate($this->_config['template']);
return parent::_toHtml();
}
示例3: _toHtml
public function _toHtml()
{
$grid_col_ls = $this->getGeneralConfig("grid_col_ls");
$grid_col_ls = $grid_col_ls ? (int) $grid_col_ls : 3;
$grid_col_ms = $this->getGeneralConfig("grid_col_ms");
$grid_col_ms = $grid_col_ms ? (int) $grid_col_ms : 3;
$grid_col_ss = $this->getGeneralConfig("grid_col_ss");
$grid_col_ss = $grid_col_ss ? (int) $grid_col_ss : 2;
$grid_col_mss = $this->getGeneralConfig("grid_col_mss");
$grid_col_mss = $grid_col_mss ? (int) $grid_col_mss : 1;
$this->assign("grid_col_ls", $grid_col_ls);
$this->assign("grid_col_ms", $grid_col_ms);
$this->assign("grid_col_ss", $grid_col_ss);
$this->assign("grid_col_mss", $grid_col_mss);
return parent::_toHtml();
}
示例4: _toHtml
protected function _toHtml()
{
extract(array_replace(array('categories' => '', 'filtertype' => '', 'attribute' => '', 'orderby' => 'price', 'order' => 'asc', 'limit' => 12, 'use_ajax' => 0, 'template' => 'cdz_filterproducts/grid.phtml', 'custom_template' => 'cdz_filterproducts/custom.phtml', 'column_count' => 5), $this->getData()));
//$categories = explode(',',trim($categories));
switch ($filtertype) {
case 1:
//new
$collection = $this->getNewProducts($categories);
$collection->setOrder($orderby, $order);
break;
case 2:
//best seller
$collection = $this->getBestSellerProducts();
break;
case 3:
//most viewed
$collection = $this->getMostViewProducts();
break;
case 4:
//attribute
$collection = $this->getProductsByAttribute($attribute);
$collection->setOrder($orderby, $order);
break;
}
$this->addCategoriestoFilter($collection, $categories);
$collection->setPageSize($limit);
//->setCurPage(1);
$this->setProductCollection($collection);
$this->setColumnCount($column_count);
if ($use_ajax == 0) {
if ($template != 'custom') {
$this->setTemplate($template);
} else {
$this->setTemplate($custom_template);
}
} else {
$this->setTemplate('cdz_filterproducts/ajax.phtml');
}
$html = parent::_toHtml();
return $html;
}
示例5: getListProductAjax
public function getListProductAjax()
{
$collection = $this->_getProductCollection()->load();
$this->setTemplate('vt/productsconfig/item.phtml');
return parent::_toHtml();
}
示例6: _toHtml
protected function _toHtml()
{
if ($this->getData('template') == 'custom_template') {
$this->setTemplate($this->getData('custom_theme'));
}
return parent::_toHtml();
}