本文整理汇总了PHP中Customers::SetListingsForCustomer方法的典型用法代码示例。如果您正苦于以下问题:PHP Customers::SetListingsForCustomer方法的具体用法?PHP Customers::SetListingsForCustomer怎么用?PHP Customers::SetListingsForCustomer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customers
的用法示例。
在下文中一共展示了Customers::SetListingsForCustomer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RemoveListing
/**
* Remove listing
* @param
*/
public function RemoveListing($plan_id = 0)
{
if (!$this->IsLoggedIn() && empty($plan_id)) {
return false;
}
Customers::SetListingsForCustomer(Session::Get('session_account_id'), $plan_id, 1, '-');
Session::Set('session_customer_plans', Customers::GetListingsForCustomer(Session::Get('session_account_id')));
return true;
}
示例2: write_log
$message .= 'Payment Processing Gross Price: ' . $total . "<br />\n";
write_log($message);
break;
}
$sql = 'UPDATE ' . TABLE_ORDERS . ' SET
status = 2,
transaction_number = \'' . $transaction_number . '\',
payment_date = \'' . date('Y-m-d H:i:s') . '\',
status_changed = \'' . date('Y-m-d H:i:s') . '\',
payment_type = 1,
payment_method = ' . $payment_method . '
WHERE order_number = \'' . $order_number . '\'';
if (database_void_query($sql)) {
// update customer orders/listings amount
Customers::SetOrdersForCustomer($result[0]['customer_id'], '+');
Customers::SetListingsForCustomer($result[0]['customer_id'], $result[0]['advertise_plan_id'], $result[0]['listings_amount'], '+');
// send email to customer
if (Orders::SendOrderEmail($order_number, 'completed', $result[0]['customer_id'])) {
write_log($sql, _ORDER_PLACED_MSG);
} else {
write_log($sql, _ORDER_ERROR);
}
} else {
write_log($sql, mysql_error());
}
} else {
write_log($sql, 'Error: no records found. ' . mysql_error());
}
break;
case 'Updated':
// 3 updated already
示例3: AfterDeleteRecord
/**
* After-Delete record
*/
public function AfterDeleteRecord()
{
// $this->curRecordId - currently deleted record
if ($this->order_status == 2 || $this->order_status == 3 || $this->order_status == 4) {
// update customer orders/listings amount
Customers::SetOrdersForCustomer($this->order_customer_id, '-');
if ($this->order_status == 2 || $this->order_status == 3) {
Customers::SetListingsForCustomer($this->order_customer_id, $this->order_advertise_plan_id, $this->order_listings, '-');
}
}
}