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


PHP Customers::SetOrdersForCustomer方法代码示例

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


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

示例1: write_log

                        $message .= 'Order Price: ' . $result[0]['total_price'] . "<br />\n";
                        $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':
开发者ID:mozdial,项目名称:Directory,代码行数:31,代码来源:handler_payment_notify_paypal.php

示例2: 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, '-');
         }
     }
 }
开发者ID:mozdial,项目名称:Directory,代码行数:14,代码来源:Orders.class.php


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