本文整理汇总了PHP中product类的典型用法代码示例。如果您正苦于以下问题:PHP product类的具体用法?PHP product怎么用?PHP product使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了product类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getData
function getData()
{
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
//load visitedProduct
//load userinfo bar
$output['visitedProduct'] = $this->getVisitedProduct();
$output['userInfo'] = $this->getUserInfo();
//load product comment and add product to visited list
$productId = $this->input->post('productId');
if ($productId != 0) {
$output['productComment'] = $this->getProductComment($productId);
$this->addProductCookie($productId);
}
//load compare product
$compareCookie = $this->input->cookie('compareProduct');
$compareArray = explode(",", $compareCookie);
array_push($compareArray, 0);
$compareProduct = new product();
$compareProduct->where_in('id', $compareArray);
$compareProduct->get_iterated();
$this->compareProduct = $compareProduct;
$this->compareArray = $compareArray;
$dis['base_url'] = base_url();
$output['compareProduct'] = $this->load->view('front/includes/compareProductSmall', $dis, true);
$output['compareArray'] = $compareArray;
//get number of cart item
$output['numCart'] = $this->countCartItem();
$this->output->set_header('Content-type: application/json');
$this->output->set_output(json_encode($output));
} else {
show_404();
}
}
开发者ID:lxthien,项目名称:batdongsan,代码行数:33,代码来源:syn.php
示例2: check_reorder_level
public function check_reorder_level()
{
global $db;
global $auth_session;
$domain_id = domain_id::get($this->domain_id);
//sellect qty and reorder level
$inventory = new product();
$sth = $inventory->select_all('count');
$inventory_all = $sth->fetchAll(PDO::FETCH_ASSOC);
$email = "";
foreach ($inventory_all as $row) {
if ($row['quantity'] <= $row['reorder_level']) {
$message = "The quantity of Product: " . $row['description'] . " is " . siLocal::number($row['quantity']) . ", which is equal to or below its reorder level of " . $row['reorder_level'];
$return['row_' . $row['id']]['message'] = $message;
$email_message .= $message . "<br />\n";
}
}
//print_r($return);
#$attachment = file_get_contents('./tmp/cache/' . $pdf_file_name);
$email = new email();
$email->notes = $email_message;
$email->from = $email->get_admin_email();
$email->to = $email->get_admin_email();
#$email -> bcc = "justin@localhost";
$email->subject = "Simple Invoices reorder level email";
$email->send();
return $return;
}
开发者ID:alachaum,项目名称:simpleinvoices,代码行数:28,代码来源:inventory.php
示例3: insert_product_warehouse
public function insert_product_warehouse($form)
{
$data = array();
$data['product_id'] = $form['product_id'];
$data['warehouse_cost'] = $form['product_cost'];
$data['warehouse_price'] = $form['product_price'];
$data['warehouse_quantity'] = $form['product_quantity'];
$data['warehouse_barcode'] = $form['product_barcode'];
$data['warehouse_qtytype'] = $form['p_qtytype'];
$data['warehouse_sp_bill'] = $form['sup_bill'];
$this->insert($this->table_name, $data);
$accounts = new accounts();
$products = new product();
// Create GL
$amount = $form['product_cost'] * $products->generate_item_quantity($form['product_id'], $form['p_qtytype'], $form['product_quantity']);
$type = 'debit';
$account = 'Purchase';
$account_type = 'Stock';
$date = $accounts->_date('Y-m-d H:i:s', date('d-m-Y'));
$results = $accounts->create_general_ledger($amount, $type, $account, $account_type, $date);
// Purchase
$product = $form['product_id'];
$cost = $form['product_cost'];
$quantity = $products->generate_item_quantity($form['product_id'], $form['p_qtytype'], $form['product_quantity']);
$date = $date;
$account = 'purchase';
$account_type = 'stock';
$results = $accounts->create_purchase($product, $cost, $quantity, $date, $account, $account_type);
return $this->row_count();
}
开发者ID:TheHanif,项目名称:POS-10,代码行数:30,代码来源:class.warehouse.php
示例4: transform
/**
* Transforms an object (product) to a string (number).
*
* @param product|null $product
* @return string
*/
public function transform($product)
{
if (null === $product) {
return '';
}
return $product->getId();
}
开发者ID:DWS-DAW,项目名称:T0,代码行数:13,代码来源:ProductToNumberTransformer.php
示例5: deleteProduct_Action
function deleteProduct_Action()
{
$product_id = $_GET['product_id'];
$list_url = 'http://' . HOST . '/' . APPLICATION . '/index.php?page=home';
$product = new product();
$result = $product->deleteProduct($product_id);
header("Location: {$list_url}");
}
开发者ID:kedika,项目名称:Login_Register_Example,代码行数:8,代码来源:product.php
示例6: store
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//dd($request);
$product = new product();
$product->name = $request->name;
$product->price = $request->price;
$product->save();
return redirect()->route('product.index');
}
开发者ID:SigurdMW,项目名称:learning-laravel-5,代码行数:15,代码来源:ProductController.php
示例7: getReviewsUrl
/**
* Rewriting this method to output new urls.
* Checks if a rewrite already exists, otherwise creates it.
*
* @param product $product
* @param category $category
* @param array $params
*/
public function getReviewsUrl($product, $category = null, $params = array())
{
$routePath = '';
$routeParams = $params;
$storeId = $product->getStoreId();
if (!$storeId) {
$storeId = Mage::app()->getStore()->getId();
$product->setStoreId($storeId);
}
$categoryId = $product->getCategoryId() && !$product->getDoNotUseCategoryId() ? $product->getCategoryId() : null;
$idPath = sprintf('reviews/%d', $product->getId());
//if ($categoryId) {
// $idPath = sprintf('%s/%d', $idPath, $categoryId);
//}
$rewrite = $this->getUrlRewrite();
$rewrite->setStoreId($storeId)->loadByIdPath($idPath);
$oldRequestPath = $product->getRequestPath();
if ($rewrite->getId()) {
// REWRITE RULE EXISTS
$requestPath = $rewrite->getRequestPath();
$product->setRequestPath($requestPath);
} else {
// CREATE REWRITE RULE
$model = Mage::getModel('reviewsearchfriendlyurls/url');
$requestPath = $model->addUrlRewrite($product);
}
if (isset($routeParams['_store'])) {
$storeId = Mage::app()->getStore($routeParams['_store'])->getId();
}
if ($storeId != Mage::app()->getStore()->getId()) {
$routeParams['_store_to_url'] = true;
}
if (!empty($requestPath)) {
$routeParams['_direct'] = $requestPath;
} else {
$routePath = 'catalog/product/view';
$routeParams['id'] = $product->getId();
$routeParams['s'] = $product->getUrlKey();
//if ($categoryId) {
// $routeParams['category'] = $categoryId;
//}
}
// reset cached URL instance GET query params
if (!isset($routeParams['_query'])) {
$routeParams['_query'] = array();
}
$url = $this->getUrlInstance()->setStore($storeId)->getUrl($routePath, $routeParams);
$product->setRequestPath($oldRequestPath);
return $url;
}
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:58,代码来源:Reviews.php
示例8: bill_checkout
function bill_checkout($amount, $invoice, $currency_iso, $acct_fields, $total_recurring = false, $recurr_bill_arr = false)
{
# Validate the currency:
if (!$this->validate_currency($currency_iso)) {
return false;
}
# Special JPY formatting:
if ($currency_iso == 'JPY') {
$amount = round($amount);
}
# Get the regular period for this subscription:
$sched = $recurr_bill_arr[0]["recurr_schedule"];
if ($sched == 0) {
$p3 = '1';
$t3 = 'W';
} elseif ($sched == 1) {
$p3 = '1';
$t3 = 'M';
} elseif ($sched == 2) {
$p3 = '3';
$t3 = 'M';
} elseif ($sched == 3) {
$p3 = '6';
$t3 = 'M';
} elseif ($sched == 4) {
$p3 = '1';
$t3 = 'Y';
} elseif ($sched == 5) {
$p3 = '2';
$t3 = 'Y';
}
$url = "https://www.paypal.com/cgi-bin/webscr";
# Get the next bill date for this subscription:
if ($recurr_bill_arr[0]["recurr_type"] == "1") {
# Pro-rate billing:
include_once PATH_MODULES . 'product/product.inc.php';
$product = new product();
$arr = $product->recurrDates($recurr_bill_arr[0]["recurr_schedule"], $recurr_bill_arr[0]["recurr_weekday"], $recurr_bill_arr[0]["recurr_week"]);
$remain_time = $arr['end'] - time();
$period1 = round($remain_time / 86400);
$subscr_date = date("Y-m-d", $arr["end"]);
$vals = array(array('cmd', '_xclick-subscriptions'), array('bn', 'Agileco.AgileBill'), array('business', $this->cfg['email']), array('item_name', "Invoice No:" . $invoice), array('return', $this->success_url . $invoice), array('cancel_return', $this->decline_url . $invoice), array('notify_url', $this->return_url), array('currency_code', $currency_iso), array('invoice', $invoice), array('first_name', $acct_fields['first_name']), array('last_name', $acct_fields['last_name']), array('payer_business_name', $acct_fields['company']), array('address_street', $acct_fields['address1']), array('address_city', $acct_fields['city']), array('address_state', $acct_fields['state']), array('address_zip', $acct_fields['zip']), array('address_country', $acct_fields['country_id']), array('payer_email', $acct_fields['email']), array('payer_id', $acct_fields['id']), array('txn_type', 'subscr_signup'), array('a1', $amount), array('p1', $period1), array('t1', 'D'), array('a3', $total_recurring), array('p3', $p3), array('t3', $t3), array('src', "1"), array('sra', "1"));
} else {
# Bill on anniversary:
$vals = array(array('cmd', '_xclick-subscriptions'), array('business', $this->cfg['email']), array('item_name', "Invoice No:" . $invoice), array('return', $this->success_url . $invoice), array('cancel_return', $this->decline_url . $invoice), array('notify_url', $this->return_url), array('currency_code', $currency_iso), array('invoice', $invoice), array('first_name', $acct_fields['first_name']), array('last_name', $acct_fields['last_name']), array('payer_business_name', $acct_fields['company']), array('address_street', $acct_fields['address1']), array('address_city', $acct_fields['city']), array('address_state', $acct_fields['state']), array('address_zip', $acct_fields['zip']), array('address_country', $acct_fields['country_id']), array('payer_email', $acct_fields['email']), array('payer_id', $acct_fields['id']), array('txn_type', 'subscr_signup'), array('a1', $amount), array('p1', $p3), array('t1', $t3), array('a3', $total_recurring), array('p3', $p3), array('t3', $t3), array('src', "1"), array('sra', "1"));
}
$this->post_vars($url, $vals);
return true;
}
开发者ID:chiranjeevjain,项目名称:agilebill,代码行数:49,代码来源:PAYPAL_RECURRING.php
示例9: __construct
public function __construct($pID = -1)
{
if (is_null(self::$conn)) {
self::$conn = mysqli_connect('localhost', 'root', 'iti', 'eShop');
}
if ($pID != -1) {
$query = "select * from products where pID={$pID} ";
$result = mysqli_query(self::$conn, $query);
// if(mysqli_num_rows($result)>0)
// {
$product = mysqli_fetch_assoc($result);
$this->pID = $product['pID'];
$this->pName = $product['pName'];
$this->pPrice = $product['pPrice'];
$this->pQuantity = $product['pQuantity'];
$this->pImg = $product['pImg'];
$this->pDesc = $product['pDesc'];
$this->scID = $product['scID'];
// }
// else
// }
// return 'undefined';
// }
}
}
开发者ID:SalmaNegm,项目名称:eShop,代码行数:25,代码来源:products.php
示例10: get_products
public function get_products()
{
$result = array();
$query = 'SELECT Id, Unitprice, Pricebook2.Id, Pricebook2.Name, ' . product::get_sf_fields() . ', LastModifiedDate FROM PricebookEntry WHERE Product2.Data_Source__c = \'New Records Salesforce\' AND LastModifiedDate > ' . utcDateFormat(time() + 7200);
$response = $this->conn->query($query);
foreach ($response->records as $record) {
if (!isset($result[$record->Product2->Id])) {
$result[$record->Product2->Id] = $record->Product2;
}
$key = 'Standard';
switch ($record->Pricebook2->Name) {
case 'Price Book 1':
$key = 'PRICE1';
break;
case 'Price Book 2':
$key = 'PRICE2';
break;
case 'Price Book 3':
$key = 'PRICE3';
break;
}
$result[$record->Product2->Id]->{$key} = $record->UnitPrice;
$result[$record->Product2->Id]->LastModifiedDate = $record->LastModifiedDate;
}
return $result;
}
开发者ID:shaheeda622,项目名称:sfbeams,代码行数:26,代码来源:salesforce_ins.php
示例11: install
static function install()
{
$db = Database::instance();
$db->query("CREATE TABLE IF NOT EXISTS {products} (\n `id` int(9) NOT NULL auto_increment,\n `name` TEXT NOT NULL,\n `cost` INTEGER(9) default 0,\n `description` varchar(1024),\n PRIMARY KEY (`id`))\n ENGINE=InnoDB DEFAULT CHARSET=utf8;");
product::create("4x6", 5, "4\"x6\" print");
product::create("8x10", 25, "8\"x10\" print");
product::create("8x12", 30, "8\"x12\" print");
module::set_version("basket", 1);
}
开发者ID:kuranoglu,项目名称:gallery3-contrib,代码行数:9,代码来源:basket_installer.php
示例12: photo_top
static function photo_top($theme)
{
if (product::isForSale($theme->item()->id)) {
$view = new View("add_to_basket.html");
$view->item = $theme->item();
return $view->render();
}
return "";
}
开发者ID:ChrisRut,项目名称:gallery3-contrib,代码行数:9,代码来源:basket_theme.php
示例13: productsList
function productsList()
{
$page = new page();
$prod = new product();
if (isset($_GET['sort'])) {
if ($_GET['sort'] == "ASC") {
$sort = "DESC";
} else {
$sort = "ASC";
}
} else {
$sort = "";
}
$params = array();
$params = $page->setProductsParams();
$products = $prod->getList($params, $sort);
$page->displayProducts($products, $params, $sort);
}
开发者ID:nesoman,项目名称:zadaca1,代码行数:18,代码来源:products.php
示例14: show_productSale_new
function show_productSale_new($template)
{
global $TPL;
global $productSaleItemsDoExist;
global $productSaleID;
$taxName = config::get_config_item("taxName");
$productSaleItem = new productSaleItem();
$productSaleItem->set_values();
// wipe clean
$product = new product();
$ops = $product->get_assoc_array("productID", "productName");
$TPL["productList_dropdown"] = page::select_options($ops, $productSaleItem->get_value("productID"));
$productSaleItemsDoExist and $TPL["display"] = "display:none";
if ($taxName) {
$TPL["sellPriceTax_check"] = sprintf(" <input type='checkbox' name='sellPriceIncTax[]' value='1'%s> inc %s", $productSaleItem->get_value("sellPriceIncTax") ? ' checked' : '', $taxName);
}
$TPL["psid"] = $productSaleID;
// poorly named template variable to prevent clobbering
include_template($template);
}
开发者ID:cjbayliss,项目名称:alloc,代码行数:20,代码来源:productSale.php
示例15: detail
public function detail()
{
//get expenseaccount
$expenseaccountobj = new expenseaccount();
$detail['expense_account_all'] = $expenseaccountobj->get_all();
//get customers with domain_id from session by constructor
$customerobj = new customer();
$detail['customer'] = $customerobj->get();
$detail['customer_all'] = $customerobj->get_all();
//get billers with domain_id from session by constructor
$billerobj = new biller();
$detail['biller_all'] = $billerobj->get_all();
//get invoices
$invoiceobj = new invoice();
$detail['invoice_all'] = $invoiceobj->get_all();
//get products
$productobj = new product();
$detail['product_all'] = $productobj->get_all();
return $detail;
}
开发者ID:dadigo,项目名称:simpleinvoices,代码行数:20,代码来源:expense.php
示例16: index
/**
* 显示商品列表
*/
public function index()
{
$return_struct = array('status' => 0, 'code' => 501, 'msg' => 'Not Implemented', 'content' => array());
try {
//* 初始化返回数据 */
$return_data = array('assoc' => NULL, 'count' => 0);
//* 收集请求数据 ==根据业务逻辑定制== */
$request_data = $this->input->get();
$request_data['status'] = isset($request_data['status']) ? (int) $request_data['status'] : 0;
$struct = product::get_struct($request_data);
$query_struct_current = $struct['query'];
$query_struct_current['where']['type'] = array(ProductService::PRODUCT_TYPE_GOODS, ProductService::PRODUCT_TYPE_CONFIGURABLE, ProductService::PRODUCT_TYPE_ASSEMBLY);
$request_struct_current = $struct['request'];
// 每页条目数
controller_tool::request_per_page($query_struct_current, $request_data);
$return_data = BLL_Product::index($query_struct_current);
// 模板输出 分页
$this->pagination = new Pagination(array('total_items' => $return_data['count'], 'items_per_page' => $query_struct_current['limit']['per_page']));
$query_struct_current['limit']['page'] = $this->pagination->current_page;
//* 如果是ajax请求缩减返回的字段 ==根据业务逻辑定制== */
if ($this->is_ajax_request()) {
$requestkeys = array('id', 'category_id', 'title', 'store', 'on_sale', 'price', 'sku');
array_walk($return_data['assoc'], 'util::simplify_return_array', $requestkeys);
}
//* 补充&修改返回结构体 */
$return_struct['status'] = 1;
$return_struct['code'] = 200;
$return_struct['msg'] = '';
$return_struct['content'] = $return_data;
//* 请求类型 */
if ($this->is_ajax_request()) {
// ajax 请求
// json 输出
$this->template->content = $return_struct;
} else {
//* html 输出 ==根据业务逻辑定制== */
//* 模板输出 */
$this->template->return_struct = $return_struct;
$content = new View($this->package_name . '/' . $this->class_name . '/' . __FUNCTION__);
//* 变量绑定 */
$this->template->title = Kohana::config('site.name');
$this->template->content = $content;
//* 请求结构数据绑定 */
$this->template->content->request_data = $request_data;
$this->template->content->request_struct = $request_struct_current;
$this->template->content->query_struct = $query_struct_current;
//* 返回结构体绑定 */
$this->template->content->return_struct = $return_struct;
}
// end of request type determine
} catch (MyRuntimeException $ex) {
$this->_ex($ex, $return_struct, $request_data);
}
}
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:57,代码来源:product.php
示例17: index
public function index()
{
$return_struct = array('status' => 0, 'code' => 501, 'msg' => 'Not Implemented', 'content' => array());
try {
//* 初始化返回数据 */
$return_data = array('assoc' => NULL, 'count' => 0);
//* 收集请求数据 ==根据业务逻辑定制== */
$request_data = $this->input->get();
$site_ids = role::get_site_ids();
if (empty($site_ids)) {
throw new MyRuntimeException(Kohana::lang('o_global.access_denied'), 403);
}
$in_site_id = site::id();
if (isset($request_data['site_id']) and $request_data['site_id'] === '0') {
unset($request_data['site_id']);
}
if (isset($request_data['site_id']) and !in_array($request_data['site_id'], $site_ids)) {
throw new MyRuntimeException(Kohana::lang('o_global.access_denied'), 403);
}
if ($in_site_id > 0) {
$query_site_id = $in_site_id;
} else {
throw new MyRuntimeException(Kohana::lang('o_global.select_site'), 400);
}
$struct = product::get_struct($request_data, $query_site_id);
$query_struct_current = $struct['query'];
$request_struct_current = $struct['request'];
$query_struct_current['limit']['per_page'] = 1;
$return_data = BLL_Product::index($query_struct_current);
$products = $return_data['assoc'];
$content = new View($this->package_name . '/' . $this->class_name . '/' . __FUNCTION__);
$this->template->content = $content;
$this->template->content->products = $products;
} catch (MyRuntimeException $ex) {
$return_struct['status'] = 0;
$return_struct['code'] = $ex->getCode();
$return_struct['msg'] = $ex->getMessage();
//TODO 异常处理
//throw $ex;
if ($this->is_ajax_request()) {
$this->template->content = $return_struct;
} else {
$this->template->return_struct = $return_struct;
$content = new View('info');
$this->template->content = $content;
//* 请求结构数据绑定 */
$this->template->content->request_data = $request_data;
//* 返回结构体绑定 */
$this->template->content->return_struct = $return_struct;
}
}
}
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:52,代码来源:pdttpl.php
示例18: install
static function install()
{
$db = Database::instance();
$db->query("CREATE TABLE IF NOT EXISTS {products} (\n `id` int(9) NOT NULL auto_increment,\n `name` TEXT NOT NULL,\n `cost` DECIMAL(10,2) default 0,\n `description` varchar(1024),\n `postage_band_id` int(9) default 1,\n PRIMARY KEY (`id`))\n DEFAULT CHARSET=utf8;");
$db->query("CREATE TABLE IF NOT EXISTS {product_overrides} (\n `id` int(9) NOT NULL auto_increment,\n `item_id` int(9) NOT NULL,\n `none` BOOLEAN default false,\n PRIMARY KEY (`id`))\n DEFAULT CHARSET=utf8;");
$db->query("CREATE TABLE IF NOT EXISTS {item_products} (\n `id` int(9) NOT NULL auto_increment,\n `product_override_id` int(9) NOT NULL,\n `product_id` int(9) NOT NULL,\n `include` BOOLEAN default false,\n `cost` DECIMAL(10,2) default -1,\n PRIMARY KEY (`id`))\n ENGINE=InnoDB DEFAULT CHARSET=utf8;");
$db->query("CREATE TABLE IF NOT EXISTS {postage_bands} (\n `id` int(9) NOT NULL auto_increment,\n `name` TEXT NOT NULL,\n `flat_rate` DECIMAL(10,2) default 0,\n `per_item` DECIMAL(10,2) default 0,\n PRIMARY KEY (`id`))\n DEFAULT CHARSET=utf8;");
postage_band::create("No Postage", 0, 0);
product::create("4x6", 5, "4\"x6\" print", 1);
product::create("8x10", 25, "8\"x10\" print", 1);
product::create("8x12", 30, "8\"x12\" print", 1);
module::set_version("basket", 2);
}
开发者ID:ChrisRut,项目名称:gallery3-contrib,代码行数:13,代码来源:basket_installer.php
示例19: bill_checkout
function bill_checkout($amount, $invoice, $currency_iso, $acct_fields, $total_recurring = false, $recurr_bill_arr = false)
{
# Get the regular period for this subscription:
$sched = $recurr_bill_arr[0]["recurr_schedule"];
if ($sched == 0) {
$rec_period = '7';
} elseif ($sched == 1) {
$rec_period = '30';
} elseif ($sched == 2) {
$rec_period = '91';
} elseif ($sched == 3) {
$rec_period = '182';
} elseif ($sched == 4) {
$rec_period = '365';
} elseif ($sched == 5) {
return false;
}
$url = "https://www.moneybookers.com/app/payment.pl";
# Get the next bill date for this subscription:
if ($recurr_bill_arr[0]["recurr_type"] == "1") {
# Pro-rate billing:
include_once PATH_MODULES . 'product/product.inc.php';
$product = new product();
$arr = $product->recurrDates($recurr_bill_arr[0]["recurr_schedule"], $recurr_bill_arr[0]["recurr_weekday"], $recurr_bill_arr[0]["recurr_week"]);
$rec_start_date = date("d/m/Y", $arr["end"]);
$end = $arr["end"] + 86400 * 365 * 10;
$rec_end_date = date("d/m/Y", $end);
$vals = array(array('pay_to_email', $this->cfg['account']), array('detail1_description', "Payment For Invoice No. " . $invoice), array('amount', $amount), array('currency', $currency_iso), array('status_url', $this->return_url), array('return_url', $this->success_url . $invoice), array('cancel_url', $this->decline_url . $invoice), array('firstname', $acct_fields["first_name"]), array('lastname', $acct_fields["last_name"]), array('address', $acct_fields["address1"]), array('postal_code', $acct_fields["zip"]), array('city', $acct_fields["city"]), array('state', $acct_fields["state"]), array('transaction_id', $invoice), array('rec_amount', $total_recurring), array('rec_start_date', $rec_start_date), array('rec_end_date', $rec_end_date), array('rec_period', $rec_period));
} else {
# Bill on anniversary:
$rec_start_date = date("d/m/Y", time());
$end = time() + 86400 * 365 * 10;
$rec_end_date = date("d/m/Y", $end);
$vals = array(array('pay_to_email', $this->cfg['account']), array('detail1_description', "Payment For Invoice No. " . $invoice), array('amount', $amount), array('currency', $currency_iso), array('status_url', $this->return_url), array('return_url', $this->success_url), array('cancel_url', $this->decline_url), array('firstname', $acct_fields["first_name"]), array('lastname', $acct_fields["last_name"]), array('address', $acct_fields["address1"]), array('postal_code', $acct_fields["zip"]), array('city', $acct_fields["city"]), array('state', $acct_fields["state"]), array('transaction_id', $invoice), array('rec_amount', $total_recurring), array('rec_start_date', $rec_start_date), array('rec_end_date', $rec_end_date), array('rec_period', $rec_period));
}
$this->post_vars($url, $vals);
return true;
}
开发者ID:chiranjeevjain,项目名称:agilebill,代码行数:38,代码来源:MONEYBOOKERS_RECURRING.php
示例20: get_list
public static function get_list($_FORM = array())
{
$filter = product::get_list_filter($_FORM);
$debug = $_FORM["debug"];
$debug and print "\n<pre>_FORM: " . print_r($_FORM, 1) . "</pre>";
$debug and print "\n<pre>filter: " . print_r($filter, 1) . "</pre>";
if (is_array($filter) && count($filter)) {
$f = " WHERE " . implode(" AND ", $filter);
}
// Put the inactive ones down the bottom.
$f .= " ORDER BY productActive DESC, productName";
$taxName = config::get_config_item("taxName");
$query = prepare("SELECT * FROM product " . $f);
$db = new db_alloc();
$db->query($query);
while ($row = $db->next_record()) {
$product = new product();
$product->read_db_record($db);
$row["taxName"] = $taxName;
$rows[] = $row;
}
return $rows;
}
开发者ID:cjbayliss,项目名称:alloc,代码行数:23,代码来源:product.inc.php
注:本文中的product类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论