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


PHP Price::getPrice方法代码示例

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


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

示例1: insertPrice

 public function insertPrice(Price $price)
 {
     $cn = new Conexao();
     $sql = "INSERT INTO prices_added (name, description, price, place_id, place_api_id) VALUES ('" . $price->getName() . "','" . $price->getDescription() . "','" . $price->getPrice() . "','" . $price->getPlaceId() . "','" . $price->getPlaceApiId() . "')";
     $result = $cn->execute($sql);
     $id = $cn->returnInsertedId();
     $cn->disconnect();
     if ($result != false) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:sbvb,项目名称:BestPlacesWS,代码行数:13,代码来源:ServiceDAO.php

示例2: flush

 /**
  * 
  * @param Price $price
  * @return int id of the Price inserted in base. False if it didn't work.
  */
 public static function flush($price)
 {
     $priceId = $price->getId();
     $pricevar = $price->getPrice();
     if ($priceId > 0) {
         $sql = 'UPDATE price p SET ' . 'p.price = ?, ' . 'WHERE p.id_price = ?';
         $params = array('di', &$pricevar, $priceId);
     } else {
         $sql = 'INSERT INTO price ' . '(price) ' . 'VALUES(?) ';
         $params = array('d', &$pricevar);
     }
     $idInsert = BaseSingleton::insertOrEdit($sql, $params);
     if ($idInsert !== false && $priceId > 0) {
         $idInsert = $priceId;
     }
     return $idInsert;
 }
开发者ID:Eurymone,项目名称:Student-Exam-Report-System,代码行数:22,代码来源:PriceDAL.php

示例3: multiselect

 /**
  * Acheter des objets. Si un erreur arrive, annule toutes les transactions,
  * mais ne ferme pas la session.
  * 
  * @param String $obj_ids
  * @param String $trace
  * @param int $operator_id
  * @return int $state
  */
 public function multiselect($obj_ids, $trace, $operator_id)
 {
     $obj_ids = explode(',', $obj_ids);
     $prices = array();
     // récupération des ids, du prix
     foreach ($obj_ids as $value) {
         $obj_id = trim($value);
         $object = new Object($obj_id);
         $price = Price::getPrice($this->Buyer, $this->Point, $object);
         if (is_null($price)) {
             return -1;
         }
         $prices[$obj_id] = $price;
     }
     echo "COUCOU";
     echo "<pre>";
     print_r($prices);
     echo "</pre>";
     foreach ($prices as $key => $value) {
         echo $key . " " . $value . " " . $operator_id . "\n";
         $return = $this->select($key, $value, $trace, $operator_id);
         // si erreur, on annul tout
         if ($return != 1) {
             $this->cancelCart();
             return $return;
         }
     }
     return 1;
 }
开发者ID:buckutt,项目名称:Archives,代码行数:38,代码来源:Buy.class.php

示例4: fix

 function fix($bill_id)
 {
     $products = $this->getByBillId($bill_id);
     $product = new Product();
     $price = new Price();
     $tax = new Tax();
     $bill = new Bill();
     $tmp = $bill->get($bill_id);
     $bill_data = $tmp[0];
     $customer = new Customer();
     $tmp = $customer->get($bill_data[1]);
     $customer_data = $tmp[0];
     for ($i = 0; $i < count($products); $i++) {
         $tmp = $this->getByBillIdAndProductId($bill_id, $products[$i][2]);
         $bill_product_data = $tmp[0];
         $tmp = $product->get($products[$i][2]);
         $product_data = $tmp[0];
         $tmp = $price->getPrice($customer_data[11], $product_data[0]);
         $price_data = $tmp[0];
         $tmp = $tax->get($product_data[4]);
         $tax_data = $tmp[0];
         $this->update($bill_product_data[0], array($bill_product_data[1], $bill_product_data[2], $bill_product_data[3], $bill_product_data[4], $bill_product_data[5], $price_data[3], $tax_data[2]));
     }
 }
开发者ID:nebulade,项目名称:faursprung_application,代码行数:24,代码来源:Kopie+von+Bill_Product.php

示例5: array

        if ($remote_tmp[0] == $tmp[0]) {
            $found = true;
            break;
        }
    }
    $tmp_data = $product->get($tmp[0], array("name", "details", "category_id", "tax_id", "available", "group_id", "order_number", "anmerkung"));
    if (!$found) {
        $product_net->create($tmp[0], $tmp_data[0]);
        $new_product_count++;
    } else {
        $product_net->update($tmp[0], $tmp_data[0]);
    }
}
$main_box->add(new NTKLabel("", "neue Produkte online: " . $new_product_count), 200, 0, "background-color: #dfe7f3;");
$main_box->add(new NTKLabel("", "online Produkte gel&ouml;scht: " . $del_product_count), 200, 0, "background-color: #dfe7f3;");
// check for prices on products
$local_products = $product->get('', array('product_id'), " available=1 ");
$local_pricesets = $priceset->get('');
foreach ($local_products as $tmp) {
    foreach ($local_pricesets as $tmp_priceset) {
        $tmp_price = $price->getPrice($tmp_priceset[0], $tmp[0]);
        if (count($tmp_price) <= 0) {
            continue;
        }
        if ($price_net->exists($tmp_priceset[0], $tmp[0])) {
            $price_net->update($tmp_priceset[0], $tmp[0], array_slice($tmp_price[0], 3));
        } else {
            $price_net->create($tmp_priceset[0], $tmp[0], array_slice($tmp_price[0], 3));
        }
    }
}
开发者ID:nebulade,项目名称:faursprung_application,代码行数:31,代码来源:ProductSync.php

示例6:

$customer_data = $customer->get($_SESSION['username']);
$priceset_id = 0;
if (count($customer_data) > 0) {
    $priceset_id = $customer_data[0][11];
}
$tmp_priceset = $priceset->get($priceset_id);
$netto = 0;
if (count($tmp_priceset) > 0) {
    $netto = $tmp_priceset[0][2];
}
// prepare search/filter params
$product_id = var_get_post("product_id", "");
$list = $product->get($product_id);
// $count = $product->getCountByFilter($search_product, $search_category);
for ($i = 0; $i < count($list); $i++) {
    $tmp_price = $price->getPrice($priceset_id, $list[$i][0]);
    ?>

	<tr>
		<td rowspan="3" width="200px"><img src="Bilder/<?php 
    echo $list[$i][0];
    ?>
.jpg" width="200px"></td>
		<td align="center"><b><big><?php 
    echo $list[$i][1];
    ?>
</big></b><br><br></td>
	</tr>
	<tr>
		<td><font color="#8C8C8C">Produktnummer:</font> <?php 
    echo $list[$i][0];
开发者ID:nebulade,项目名称:faursprung_website,代码行数:31,代码来源:product_details.php

示例7: constructWithValidParameters

 /**
  * Verify valid constructor parameters cause no exceptions.
  *
  * @param mixed $type  The description of the price.
  * @param mixed $price The price of the price.
  *
  * @test
  * @dataProvider constructorGoodData
  *
  * @return void
  */
 public function constructWithValidParameters($type, $price)
 {
     $entity = new Price(['type' => $type, 'price' => $price]);
     $this->assertSame($type, $entity->getType());
     $this->assertSame($price, $entity->getPrice());
 }
开发者ID:chadicus,项目名称:marvel-api-client,代码行数:17,代码来源:PriceTest.php

示例8: checkPrice

 /**
  * Vérifie si le prix est correct.
  * 
  * @param object $User
  * @param object $Point
  * @param object $Object
  * @param int $credit
  * @return int $state
  */
 public static function checkPrice(&$User, &$Point, &$Object, $credit)
 {
     //TODO vérifier suite aux modifs sur la requere des propositions
     $creditBDD = Price::getPrice($User, $Point, $Object);
     if (!is_null($creditBDD)) {
         if (is_null($credit) or $creditBDD == $credit) {
             return 1;
         } else {
             return 0;
         }
     } else {
         return 0;
     }
 }
开发者ID:buckutt,项目名称:Archives,代码行数:23,代码来源:Price.class.php

示例9: array

    case "delete":
        $bill->delete(var_get("bill_id", ""));
        if ($fp_tour_id != "") {
            $onload .= "location.href = 'tour.php?action=list_tour&tour_id=" . $fp_tour_id . "&date=" . $fp_date . "';";
        }
        break;
    case "position_add":
        $bill_data = $bill->get(var_post("bill_id", ""));
        /* autoset anmerkung vom produkt, wenn nichts als anmerkung gegeben */
        $details = var_post("details", "");
        if ($details == "") {
            $product_data = $product->get(var_post("product_id", ""));
            $details = $product_data[0][8];
        }
        if ($bill_data[0][5] == -1) {
            $bill_product->create(array(var_post("bill_id", ""), var_post("product_id", ""), var_post("amount", ""), $details, var_post("rabatt", ""), 0, 0));
        } else {
            $customer_data = $customer->get($bill_data[0][1]);
            $price_data = $price->getPrice($customer_data[0][11], var_post("product_id", ""));
            $product_data = $product->get(var_post("product_id", ""));
            $tax_data = $tax->get($product_data[0][4]);
            $bill_product->create(array(var_post("bill_id", ""), var_post("product_id", ""), var_post("amount", ""), $details, var_post("rabatt", ""), $price_data[0][3], $tax_data[0][2]));
        }
        break;
    case "position_delete":
        $bill_product->delete(var_get("bill_product_id", ""));
        break;
    case "position_edit":
        $bill_product->update(var_post("bill_product_id", ""), array(var_post("bill_id", ""), var_post("product_id", ""), var_post("amount", ""), var_post("details", ""), var_post("rabatt", ""), var_post("price", ""), var_post("tax", "")));
        break;
}
开发者ID:nebulade,项目名称:faursprung_application,代码行数:31,代码来源:db_action.php


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