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


PHP Product::getProduct方法代码示例

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


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

示例1: edit

 public function edit($id)
 {
     $view = new View("product/edit.php");
     $modelProduct = new Product();
     $product = $modelProduct->getProduct($id);
     $view->set('product', $product);
     $view->output();
 }
开发者ID:phanngoc,项目名称:mvc_ttap_laravel,代码行数:8,代码来源:ProductController.php

示例2: showAction

 public function showAction($name, $id)
 {
     $product = new Product();
     $product->getProduct($name, $id);
     $this->view->product = $product->product;
     $this->view->category_name = $product->productCategoryName;
     $this->view->productOpinions = $product->productOpinions;
     $this->view->opinionVotes = OpinionVote::getVotesByUserId($this->session->get('id'));
 }
开发者ID:RafalPydyniak,项目名称:OceniarkaPHP,代码行数:9,代码来源:ProductController.php

示例3: makeLinkProduct

 /**
  * Make link fix product
  *
  * @author MinhNV
  * Date 2010/07/07
  */
 private function makeLinkProduct()
 {
     $link_depart = '';
     $link_section = '';
     $link_product = '';
     $link_url = '';
     $depart_id = Url::get('depart_id', 0);
     $cat_id = Url::get('cat_id', 0);
     $cat_name = Url::get('cat_name', '');
     $url_filter = Url::get('url_filter');
     $arySerialize = array();
     $url_serialize = '';
     $url_product = Url::get('url_product');
     $aryParamFilter = array();
     $is_same_cat = Url::get('is_same_cat', 0);
     $is_same_depart = Url::get('is_same_depart', 0);
     $is_new = Url::get('is_new', 0);
     $is_discount_new = Url::get('is_discount_new', 0);
     $is_discount = Url::get('is_discount', 0);
     $is_attention = Url::get('is_attention', 0);
     $type_special = 0;
     if ($is_new == 1) {
         $type_special = IS_NEW;
     }
     if ($is_discount_new == 1) {
         $type_special = IS_DISCOUNT_NEW;
     }
     if ($is_discount == 1) {
         $type_special = IS_DISCOUNT;
     }
     if ($is_attention == 1) {
         $type_special = NUM_CLASSIFIED;
     }
     $city_id = Url::get('city_id', 0);
     $district_id = Url::get('district_id', 0);
     if ($url_filter) {
         $aryParamFilter = $this->buildArrayFromURL($url_filter);
     }
     if ($url_product) {
         $aryProduct = explode(',', $url_product);
         if (is_array($aryProduct) && count($aryProduct) == 1) {
             $page = '';
             $aryProduct = Product::getProduct($url_product);
             $link_product = Product::buildLinkProductDetail(0, $aryProduct['category_id'], $aryProduct['id'], $aryProduct['name']);
             $arySerialize = array('page' => $page, 'params' => array('id' => $url_product, 'title' => EClassApi::safe_title($aryProduct['name'])));
         } else {
             if ($is_same_cat == 1) {
                 $page = CGlobal::$aryDepartName[$depart_id] . '_section';
                 $link_product = Url::build($page, array('cat_product_id' => $cat_id, 'title' => EClassApi::safe_title($cat_name), 'product_id' => $url_product));
                 $arySerialize = array('page' => $page, 'params' => array('cat_product_id' => $cat_id, 'title' => EClassApi::safe_title($cat_name), 'product_id' => $url_product));
             } else {
                 $page = 'list_product';
                 $link_product = Url::build($page, array('product_id' => $url_product));
                 $arySerialize = array('page' => $page, 'params' => array('product_id' => $url_product));
             }
         }
     } else {
         if ($depart_id) {
             $page = CGlobal::$aryDepartName[$depart_id];
             //Neu co tinh thanh
             if ($city_id > 0) {
                 $aryCity = SoLib::getListOptionCity();
                 if ($district_id > 0) {
                     //Get quan huyen
                     $aryDistrict = EClassApi::getDistrict($city_id);
                     //$districtName = $this->getDistrictName ( $district_id );
                     $aryParams = array('city_id' => $city_id, 'district_id' => $district_id, 'title' => safe_title($aryDistrict['name']));
                     $arySerialize = array('page' => $page, 'params' => $aryParams);
                     $link_depart = Url::build($page, $aryParams);
                 } else {
                     $aryParams = array('city_id' => $city_id, 'title' => safe_title($aryCity[$city_id]));
                     $arySerialize = array('page' => $page, 'params' => $aryParams);
                     $link_depart = Url::build($page, $aryParams);
                 }
             } else {
                 if ($url_filter) {
                     if ($depart_id == CGlobal::THOI_TRANG || $depart_id == CGlobal::SACH) {
                         $page = CGlobal::$aryDepartName[$depart_id] . '_section';
                         $aryParams = array('cat_product_id' => $depart_id, 'title' => safe_title(CGlobal::$aryDepart[$depart_id]));
                         $aryParams = array_merge($aryParams, $aryParamFilter);
                     } else {
                         $aryParams = $aryParamFilter;
                     }
                     $arySerialize = array('page' => $page, 'params' => $aryParams);
                     $link_depart = Url::build($page, $aryParams);
                 } else {
                     $arySerialize = array('page' => $page, 'params' => array());
                     $link_depart = Url::build($page, array());
                 }
             }
             if ($cat_id) {
                 $page = CGlobal::$aryDepartName[$depart_id] . '_section';
                 if ($city_id > 0) {
                     $aryCity = SoLib::getListOptionCity();
//.........这里部分代码省略.........
开发者ID:hqd276,项目名称:bigs,代码行数:101,代码来源:ajax_build_url.ajax.php

示例4: isset

<?php

//首页文件
//接受用户动作
$act = isset($_REQUEST['act']) ? $_REQUEST['act'] : 'index';
//加载初始化文件
include_once './includes/init.php';
//判断动作,处理动作
if ($act == 'index') {
    //查看所有分类信息
    $category = new Product();
    $categories = $category->getProduct();
    //产看特价和热销产品
    $goods = new Goods();
    $goods_offer = $goods->getGoods(8);
    $goods_hot = $goods->getGoods(12);
    $_SESSION['uri'] = $_SERVER['REQUEST_URI'];
    //查寻新闻
    $news = new News();
    $lists = $news->AllList();
    //加载首页显示模板
    include_once YIMAI_TEMP . 'index.html';
} elseif ($act == 'display') {
    //获取分类ID
    $c_id = $_GET['id'];
    //接受商品列表显示页码
    $page = isset($_GET['page']) ? $_GET['page'] : 1;
    $pagecount = $config['pagecount'];
    //var_dump($pagecount);
    //获取该类商品的总记录数
    $goods = new Goods();
开发者ID:jycx,项目名称:yimai_shop_php,代码行数:31,代码来源:index.php

示例5: Product

	$('#modal-close-callsback').click(function(){
		window.location = api.base_url + '/product';
	});

});
</script>
<?php 
include_once "api/product.php";
$Products = new Product();
?>
<div class="container">
<h2>Edit Product</h2><br>
<div class="row">
<?php 
if ($id) {
    $getProduct = $Products->getProduct($id);
    if (count($getProduct)) {
        ?>
	<div class="col-md-8">

	<form class="form-horizontal" role="form">
		<div class="form-group">
			<label for="product" class="col-sm-2 control-label">Product</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="product" placeholder="Enter product name" value="<?php 
        echo $getProduct->product;
        ?>
" />
			</div>
		</div>
		<div class="form-group">
开发者ID:moli-php,项目名称:dev-moli,代码行数:31,代码来源:editproduct.php

示例6: utf8_encode

echo utf8_encode($product->getCategoryName());
?>
</a>
		  <span class="navigation-pipe">/</span> 
		  <a title="" href="product-grid2.php?idSubCategory=<?php 
echo $infos['id_ss_categorie'];
?>
"><?php 
echo utf8_encode($product->getSubCategoryName());
?>
</a>
		  <span class="navigation-pipe">/</span> 
		  <span class="navigation_page">
			<?php 
$product = new Product($db, $_GET['idProduit']);
$infos = $product->getProduct();
echo utf8_encode($infos['libelle_produit']);
?>
		  </span> 
	  </div>
      <div class="clearfix" id="primary_block"> 
        
        <!-- right infos-->
        <div id="pb-right-column"> 

          <!-- product img-->
          <div id="image-block">
            <link rel="stylesheet" href="css/prettyPhoto.css" />
            <script src="js/jquery.prettyPhoto.js"></script> 
            <script type="text/javascript">
开发者ID:ejesoda,项目名称:ejesoda,代码行数:30,代码来源:product.php

示例7: array

if (isset($_POST['submitedit'])) {
    $as = array();
    foreach ($_POST['auto_subscribe_lists'] as $network => $list) {
        if ($list > 0) {
            $as[] = $list;
        }
    }
    $_POST['auto_subscribe_lists'] = join(",", $as);
    $p->Edit($_POST);
    Misc::Redirect('product_list.php');
}
if (isset($_POST['submitdelete'])) {
    $p->Delete($_POST['id']);
    Misc::Redirect('product_list.php');
}
$pr = $p->getProduct($_GET['id']);
$pr['auto_subscribe_lists'] = explode(',', $pr['auto_subscribe_lists']);
include 'include/top.php';
?>

<form method="post">
	<input type="hidden" id="hidden" name="id" value="<?php 
echo $pr['id'];
?>
" />
	<p>
		<label><span>Title</span></label>
		<input type="text" name="title" id="title" placeholder="Enter product title" value="<?php 
echo $pr['title'];
?>
" />
开发者ID:polaris610,项目名称:track_software,代码行数:31,代码来源:product_edit.php

示例8: getProduct

 /**
  * @param $slug
  * @return mixed
  */
 public function getProduct($slug)
 {
     $data['content_header'] = ucfirst($slug);
     $values = Product::getProduct($slug);
     $data['values'] = $values;
     $data['slug_tag'] = $slug;
     return View::make('admin.product.product', $data);
 }
开发者ID:VoDongMy,项目名称:VoDongMy,代码行数:12,代码来源:ProductController.php

示例9: redirect

    if ($product->HasGoods($id)) {
        //存在商品 ,不允许删除
        redirect('productClass.php', '当前分类下还存在商品,不允许直接删除');
    }
    //删除商品分类
    if ($product->DeletePreductId($id)) {
        redirect('productClass.php', '删除成功', 1000);
    }
} elseif ($act == 'edit') {
    //编辑分类信息
    //接收用户id
    $id = $_GET['id'];
    $product = new Product();
    $pro = $product->getProductById($id);
    //获取 商品分类信息
    $products = $product->getProduct();
    //加载模板
    include_once ADMIN_TEMP . "productClass-modify.html";
} elseif ($act == 'update') {
    //更新商品分类
    $id = $_GET['id'];
    //获取用户提交的数据
    $c_name = trim($_POST['className']);
    $c_parent_id = trim($_POST['parentId']);
    //合法性判断
    //合法性验证
    if (empty($c_name)) {
        //如果为空,跳转到添加页面
        redirect('productClass.php?act=edit', '分类名不能为空!');
    }
    //合理性验证
开发者ID:OldMo,项目名称:DaoGou,代码行数:31,代码来源:productClass.php

示例10: die

<?php

require 'include/config.php';
if (!isset($_GET['email']) || !isset($_GET['product'])) {
    die('Both email and product id are required!');
}
require 'include/class.product.php';
$p = new Product($db);
$product = $p->getProduct($_GET['product']);
if (!isset($product['id'])) {
    die('Product does not exist!');
}
include "go_template.html";
require 'include/class.user.php';
$u = new User($db);
$user = $u->getUserByEmail($_GET['email']);
if (!isset($user['id'])) {
    $u->Insert(array('name' => 'Unknown user', 'email' => $_GET['email'], 'source' => isset($_GET['source']) ? $_GET['source'] : ''));
    $user = $u->getUserByEmail($_GET['email']);
}
require 'include/class.tracking.php';
$t = new Tracking($db);
$hash = $t->newSession(array('user_id' => $user['id'], 'product_id' => $product['id'], 'source' => 'forwarder', 'cid' => $_GET['cid']));
$link = $product['networkLink'];
if (strlen($product['parameter']) > 0) {
    if (strpos($link, '?') !== false) {
        $link .= "&" . $product['parameter'];
    } else {
        $link .= "?" . $product['parameter'];
    }
}
开发者ID:polaris610,项目名称:track_software,代码行数:31,代码来源:go.php

示例11: testProduct

 public function testProduct()
 {
     $product = $this->getMock('JLM\\ProductBundle\\Model\\ProductInterface');
     $this->assertSame($this->entity, $this->entity->setProduct($product));
     $this->assertSame($product, $this->entity->getProduct());
 }
开发者ID:jlm-entreprise,项目名称:product-bundle,代码行数:6,代码来源:ProductPriceTest.php

示例12:

?>
		
		</div>			

		<div class="row package-option">	
			
			<?php 
Product::getProduct(26, 'Динозавры', '26.jpg', '', 290, 0, 'Аксесуары', 0);
?>
			
			<?php 
Product::getProduct(27, 'Животные', '27.jpg', '', 290, 0, 'Аксесуары', 0);
?>
			
			<?php 
Product::getProduct(28, 'Зверята', '28.jpg', '', 100, 0, 'Аксесуары', 0);
?>
			
			
			<?php 
//Product::getProduct(30,'Динозавр','30.jpg','', 290, 0,'Аксесуары',0);
?>
		
		</div>	
				
	</div>
</div>

<!-- /.client section -->
<div id="delivery"> 
		<div class="container">
开发者ID:evgrishin,项目名称:smart-sand.ru,代码行数:31,代码来源:index.php

示例13: array

        } else {
            $oResponse->safe = $tag->probs[1] > 0.5;
        }
    } else {
        $oResponse->data = array($response->status_msg);
    }
    echoResponse($oResponse);
});
$app->get("/product", function () use($app) {
    $product = Product::getProducts();
    $oResponse = $product;
    echoResponse($oResponse);
});
$app->get("/product/:id", function ($id) use($app) {
    $oResponse = new stdObject();
    $product = Product::getProduct($id);
    $oResponse->product = $product;
    echoResponse($oResponse);
});
$app->post("/product", function () use($app) {
    $params = $app->request->post();
    $oResponse = new stdObject();
    $name = $params['name'];
    $seller = $params['seller'];
    $photo = $params['photo'];
    $price = $params['price'];
    $docid = "";
    $verify_photo = \Clarifai\NSFW::retrieve($photo);
    $safe = false;
    if ($verify_photo->status_code == "OK") {
        $docid = $verify_photo->results[0]->docid;
开发者ID:TheOctave,项目名称:buyonear,代码行数:31,代码来源:routes.php


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