本文整理汇总了PHP中product::select方法的典型用法代码示例。如果您正苦于以下问题:PHP product::select方法的具体用法?PHP product::select怎么用?PHP product::select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类product
的用法示例。
在下文中一共展示了product::select方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: product
* This file is part of the allocPSA application <info@cyber.com.au>.
*
* allocPSA is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* allocPSA is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with allocPSA. If not, see <http://www.gnu.org/licenses/>.
*/
define("NO_REDIRECT", 1);
require_once "../alloc.php";
$db = new db_alloc();
$product = $_GET["product"];
$quantity = $_GET["quantity"];
$p = new product();
$p->set_id($product);
$p->select();
$p->set_tpl_values();
// Probably not valid XML, but jQuery will parse it.
echo "<data>\n";
echo "<price>" . page::money($TPL["sellPriceCurrencyTypeID"], $TPL["sellPrice"] * $quantity, "%m") . "</price>\n";
echo "<priceCurrency>" . $TPL["sellPriceCurrencyTypeID"] . "</priceCurrency>\n";
echo "<priceTax>" . ($TPL["sellPriceIncTax"] ? "1" : "") . "</priceTax>\n";
echo "<description>" . $TPL["description"] . "</description>\n";
echo "</data>\n";
示例2: TraerModelos
public function TraerModelos()
{
$products = product::select('id', 'modelo')->where('modelo', '<>', 'null')->groupBy('modelo')->get();
return $products;
}
示例3: tf_list
}
function tf_list($selected = "", $remove_these = array())
{
global $tflist;
$temp = $tflist;
foreach ($remove_these as $dud) {
unset($temp[$dud]);
}
echo page::select_options($temp, $selected);
return;
}
$productID = $_GET["productID"] or $productID = $_POST["productID"];
$product = new product();
if ($productID) {
$product->set_id($productID);
$product->select();
}
$tf = new tf();
$tflist = $tf->get_assoc_array("tfID", "tfName");
$extra_options = array("-1" => "META: Project TF", "-2" => "META: Salesperson TF", config::get_config_item("mainTfID") => "Main Finance TF (" . tf::get_name(config::get_config_item("mainTfID")) . ")", config::get_config_item("outTfID") => "Outgoing Funds TF (" . tf::get_name(config::get_config_item("outTfID")) . ")", config::get_config_item("inTfID") => "Incoming Funds TF (" . tf::get_name(config::get_config_item("inTfID")) . ")");
// Prepend the META options to the tflist.
$tflist = $extra_options + $tflist;
$TPL["companyTF"] = $tflist[config::get_config_item("mainTfID")];
$TPL["taxTF"] = $tflist[config::get_config_item("taxTfID")];
$taxRate = config::get_config_item("taxPercent") / 100.0;
$TPL["taxRate"] = $taxRate;
if ($_POST["save"]) {
$product->read_globals();
$product->set_value("productActive", isset($_POST["productActive"]) ? 1 : 0);
!$product->get_value("productName") and alloc_error("Please enter a Product Name.");
!$product->get_value("sellPrice") and alloc_error("Please enter a Sell Price.");