本文整理汇总了PHP中MemberOrder::getRandomCode方法的典型用法代码示例。如果您正苦于以下问题:PHP MemberOrder::getRandomCode方法的具体用法?PHP MemberOrder::getRandomCode怎么用?PHP MemberOrder::getRandomCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemberOrder
的用法示例。
在下文中一共展示了MemberOrder::getRandomCode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
//order passed?
if (!empty($_REQUEST['order'])) {
$order_id = intval($_REQUEST['order']);
if ($order_id > 0) {
$order = new MemberOrder($order_id);
} elseif (!empty($_REQUEST['copy'])) {
$order = new MemberOrder(intval($_REQUEST['copy']));
//new id
$order->id = null;
//new code
$order->code = $order->getRandomCode();
} else {
$order = new MemberOrder();
//new order
//defaults
$order->code = $order->getRandomCode();
$order->user_id = "";
$order->membership_id = "";
$order->billing = new stdClass();
$order->billing->name = "";
$order->billing->street = "";
$order->billing->city = "";
$order->billing->state = "";
$order->billing->zip = "";
$order->billing->country = "";
$order->billing->phone = "";
$order->subtotal = "";
$order->tax = "";
$order->couponamount = "";
$order->total = "";
$order->payment_type = "";