当前位置: 首页>>代码示例>>PHP>>正文


PHP producthelper::getCategoryProduct方法代码示例

本文整理汇总了PHP中producthelper::getCategoryProduct方法的典型用法代码示例。如果您正苦于以下问题:PHP producthelper::getCategoryProduct方法的具体用法?PHP producthelper::getCategoryProduct怎么用?PHP producthelper::getCategoryProduct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在producthelper的用法示例。


在下文中一共展示了producthelper::getCategoryProduct方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: renderLayout


//.........这里部分代码省略.........
                     }
                 } else {
                     if ($rs_mode == FALSE && $vm_mode == FALSE && $k2_mode == TRUE) {
                         // GENERATING HEADER
                         if ($this->config['news_header_enabled'] == 1) {
                             $news_header = $renderer->header_k2($this->config, $this->content['ID'][$i], $this->content['alias'][$i], $this->content['CID'][$i], $this->content['cat_alias'][$i], $this->content['title'][$i]);
                         }
                         // GENERATING IMAGE
                         if ($this->config['news_image_enabled'] == 1) {
                             $news_image = $renderer->image_k2($this->config, $uri, $this->content['ID'][$i], $this->content['alias'][$i], $this->content['CID'][$i], $this->content['cat_alias'][$i], $this->content['text'][$i], $this->content['title'][$i]);
                         }
                         // GENERATING READMORE
                         if ($this->config['news_readmore_enabled'] == 1) {
                             $news_readmore = $renderer->readMore_k2($this->config, $this->content['ID'][$i], $this->content['alias'][$i], $this->content['CID'][$i], $this->content['cat_alias'][$i]);
                         }
                         // GENERATING TEXT
                         if ($this->config['news_text_enabled'] == 1) {
                             $news_textt = $renderer->text_k2($this->config, $this->content['ID'][$i], $this->content['alias'][$i], $this->content['CID'][$i], $this->content['cat_alias'][$i], $this->content['text'][$i], $news_readmore);
                         }
                         // GENERATE NEWS INFO
                         if ($this->config['news_info_enabled'] == 1) {
                             $news_infoo = $renderer->info_k2($this->config, $this->content['cat_name'][$i], $this->content['CID'][$i], $this->content['cat_alias'][$i], $this->content['author'][$i], $this->content['author_id'][$i], $this->content['email'][$i], $this->config['date_publish'] == TRUE ? $this->content['date_publish'][$i] : $this->content['date'][$i], $this->content['hits'][$i], $this->content['ID'][$i], $this->content['alias'][$i], $this->content['comments'], $this->content['rating_count'][$i], $this->content['rating_sum'][$i]);
                         }
                         // GENERATE NEWS INFO2
                         if ($this->config['news_info2_enabled'] == 1) {
                             $news_infoo2 = $renderer->info_k2($this->config, $this->content['cat_name'][$i], $this->content['CID'][$i], $this->content['cat_alias'][$i], $this->content['author'][$i], $this->content['author_id'][$i], $this->content['email'][$i], $this->config['date_publish'] == TRUE ? $this->content['date_publish'][$i] : $this->content['date'][$i], $this->content['hits'][$i], $this->content['ID'][$i], $this->content['alias'][$i], $this->content['comments'], $this->content['rating_count'][$i], $this->content['rating_sum'][$i], 2);
                         }
                         // GENERATE STORE BLOCK
                         $news_k2_store = $renderer->store_k2($this->config, $this->content['ID'][$i], $this->content['plugins'][$i], $this->k2store_params);
                     } else {
                         if ($rs_mode == TRUE && $vm_mode == FALSE && $k2_mode == FALSE) {
                             $ItemData = $producthelper->getMenuInformation(0, 0, '', 'product&pid=' . $this->content['ID'][$i]);
                             $id = $this->content['ID'][$i];
                             $cid = $producthelper->getCategoryProduct($this->content['ID'][$i]);
                             $Itemid = $redhelper->getItemid($this->content['ID'][$i]);
                             $product = $producthelper->getProductById($this->content['ID'][$i]);
                             // GENERATING HEADER
                             if ($this->config['news_header_enabled'] == 1) {
                                 $news_header = $renderer->header_rs($this->config, $this->content['ID'][$i], $this->content['CID'][$i], $this->content['title'][$i], $Itemid);
                             }
                             // GENERATING IMAGE
                             if ($this->config['news_image_enabled'] == 1) {
                                 $news_image = $renderer->image_rs($this->config, $this->content['ID'][$i], $this->content['CID'][$i], $this->content['product_image'][$i], $this->content['title'][$i], $Itemid);
                             }
                             // GENERATING READMORE
                             if ($this->config['news_readmore_enabled'] == 1) {
                                 $news_readmore = $renderer->readMore_rs($this->config, $this->content['ID'][$i], $this->content['CID'][$i], $Itemid);
                             }
                             // GENERATING TEXT
                             if ($this->config['news_text_enabled'] == 1) {
                                 $news_textt = $renderer->text_rs($this->config, $this->content['ID'][$i], $this->content['CID'][$i], $this->content['text'][$i], $news_readmore, $Itemid);
                             }
                             // GENERATE NEWS INFO
                             if ($this->config['news_info_enabled'] == 1) {
                                 $news_infoo = $renderer->info_rs($this->config, $this->content['ID'][$i], $this->content['cat_name'][$i], $this->content['CID'][$i], $this->content['manufacturer'][$i], $this->config['date_publish'] == TRUE ? $this->content['date_publish'][$i] : $this->content['date'][$i], $Itemid, $this->content['manufacturer_id'][$i], 1);
                             }
                             // GENERATE NEWS INFO2
                             if ($this->config['news_info2_enabled'] == 1) {
                                 $news_infoo2 = $renderer->info_rs($this->config, $this->content['ID'][$i], $this->content['cat_name'][$i], $this->content['CID'][$i], $this->content['manufacturer'][$i], $this->config['date_publish'] == TRUE ? $this->content['date_publish'][$i] : $this->content['date'][$i], $Itemid, $this->content['manufacturer_id'][$i], 2);
                             }
                             // COMPUTE PRICE DEPENDS OF USER ID
                             $user =& JFactory::getUser();
                             $price = $producthelper->getProductPrice($this->content['ID'][$i], $this->config['rs_price_with_vat'], $user->id);
                             $price = $producthelper->getProductFormattedPrice($price, true);
                             if ($this->config['rs_add_to_cart'] == 1) {
                                 $addToCart = $producthelper->replaceCartTemplate($this->content['ID'][$i], 0, 0, 0, "", false, array(), 0, 0, 0);
开发者ID:shuramita,项目名称:anhquanggffl,代码行数:67,代码来源:helper.php

示例2:

if (COMARE_PRODUCTS == 1) {
    $compare = $producthelper->getCompare();
    ?>

	<div id="mod_compareproduct">
		<!-- Comparable Products -->
		<table border="0" cellpadding="5" cellspacing="0" width="100%">
			<?php 
    $i = 0;
    $cnt = 0;
    if ($compare['idx'] > 0) {
        for ($i = 0; $i < $compare['idx']; $i++) {
            $row = $producthelper->getProductById($compare[$i]["product_id"]);
            $catid = $compare[$i]["category_id"];
            if (!$cid) {
                $cid = $producthelper->getCategoryProduct($row->product_id);
            }
            $ItemData = $producthelper->getMenuInformation(0, 0, '', 'product&pid=' . $row->product_id);
            if (count($ItemData) > 0) {
                $Itemid = $ItemData->id;
            } else {
                $Itemid = $redhelper->getItemid($row->product_id);
            }
            $link = JRoute::_('index.php?option=com_redshop&view=product&pid=' . $row->product_id . '&cid=' . $cid . '&Itemid=' . $Itemid);
            if (PRODUCT_COMPARISON_TYPE == "category") {
                if ($cid == $catid) {
                    ?>
							<tr valign="top">
								<td width="95%">
									<span><a href='<?php 
                    echo $link;
开发者ID:,项目名称:,代码行数:31,代码来源:

示例3: array

$cart = array();
$subtotal_excl_vat = 0;
for ($i = 0; $i < count($products); $i++) {
    $cart[$i]['product_id'] = $products[$i]->product_id;
    $cart[$i]['quantity'] = $products[$i]->product_quantity;
    $quantity = $products[$i]->product_quantity;
    $product_id = $products[$i]->product_id;
    $productdetail = $producthelper->getProductById($product_id);
    $ordervolume = $ordervolume + $productdetail->product_volume;
    $order_item_id = $products[$i]->order_item_id;
    $order_item_name = $products[$i]->order_item_name;
    $order_item_sku = $products[$i]->order_item_sku;
    $wrapper_id = $products[$i]->wrapper_id;
    $p_userfield = $producthelper->getuserfield($order_item_id);
    $subscribe_detail = $model->getUserProductSubscriptionDetail($order_item_id);
    $catId = $producthelper->getCategoryProduct($product_id);
    $res = $producthelper->getSection("category", $catId);
    if (count($res) > 0) {
        $cname = $res->category_name;
        $clink = JRoute::_($url . 'index.php?option=com_redshop&view=category&layout=detail&cid=' . $catId);
    }
    $cname = "<a href='" . $clink . "'>" . $cname . "</a>";
    $Product_name = $order_item_name . '<br>' . $order_item_sku . '<br>' . $p_userfield . '<br>' . $cname;
    $subtotal_excl_vat += $products[$i]->product_item_price_excl_vat * $quantity;
    $vat = $products[$i]->product_item_price - $products[$i]->product_item_price_excl_vat;
    ?>
	<tr>
		<td>
			<table border="0" cellspacing="0" cellpadding="0" class="adminlist" width="100%">
				<tr>
					<td>
开发者ID:,项目名称:,代码行数:31,代码来源:

示例4: gotonavproduct

 /**
  * Go to nav Product
  *
  * @return  void
  */
 public function gotonavproduct()
 {
     $producthelper = new producthelper();
     $objhelper = new redhelper();
     $post = JRequest::get('post');
     $cid = $producthelper->getCategoryProduct($post['pid']);
     $ItemData = $producthelper->getMenuInformation(0, 0, '', 'product&pid=' . $post['pid']);
     if (count($ItemData) > 0) {
         $pItemid = $ItemData->id;
     } else {
         $pItemid = $objhelper->getItemid($product->product_id, $cid);
     }
     $link = JRoute::_('index.php?option=com_redshop&view=product&pid=' . $post['pid'] . '&cid=' . $cid . '&Itemid=' . $pItemid, false);
     $this->setRedirect($link);
 }
开发者ID:,项目名称:,代码行数:20,代码来源:


注:本文中的producthelper::getCategoryProduct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。