本文整理汇总了PHP中VirtueMartModelOrders::generateOrderNumber方法的典型用法代码示例。如果您正苦于以下问题:PHP VirtueMartModelOrders::generateOrderNumber方法的具体用法?PHP VirtueMartModelOrders::generateOrderNumber怎么用?PHP VirtueMartModelOrders::generateOrderNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VirtueMartModelOrders
的用法示例。
在下文中一共展示了VirtueMartModelOrders::generateOrderNumber方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check
function check()
{
if (empty($this->order_number)) {
if (!class_exists('VirtueMartModelOrders')) {
require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
}
$this->order_number = VirtueMartModelOrders::generateOrderNumber((string) time());
}
if (empty($this->order_pass)) {
$this->order_pass = 'p_' . substr(md5((string) time() . $this->order_number), 0, 5);
}
$adminID = JFactory::getSession()->get('vmAdminID');
if (isset($adminID)) {
$this->created_by = $adminID;
}
return parent::check();
}
示例2: check
function check()
{
if (empty($this->order_number)) {
if (!class_exists('VirtueMartModelOrders')) {
require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
}
$this->order_number = VirtueMartModelOrders::generateOrderNumber((string) time());
}
if (empty($this->order_pass)) {
$this->order_pass = 'p_' . substr(md5((string) time() . $this->order_number), 0, 5);
}
return parent::check();
}
示例3: check
function check()
{
if (empty($this->order_number)) {
if (!class_exists('VirtueMartModelOrders')) {
require VMPATH_ADMIN . DS . 'models' . DS . 'orders.php';
}
$this->order_number = VirtueMartModelOrders::generateOrderNumber((string) time());
}
if (empty($this->order_pass)) {
$this->order_pass = 'p_' . substr(md5((string) time() . $this->order_number), 0, 5);
}
$adminID = JFactory::getSession()->get('vmAdminID', false);
if ($adminID) {
if (!class_exists('vmCrypt')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'vmcrypt.php';
}
$adminID = vmCrypt::decrypt($adminID);
$this->created_by = $adminID;
}
return parent::check();
}