本文整理匯總了PHP中eZOrder::attribute方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZOrder::attribute方法的具體用法?PHP eZOrder::attribute怎麽用?PHP eZOrder::attribute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZOrder
的用法示例。
在下文中一共展示了eZOrder::attribute方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testIssue18233
public function testIssue18233()
{
// insert orders
$orderData = array('account_identifier' => 'ez', 'created' => 130252369, 'data_text_1' => '\\<?xml ?\\>', 'email' => 'xc@ez.no', 'productcollection_id' => '5', 'status_modifier_id' => '14', 'user_id' => 14);
$order = new eZOrder($orderData);
$order->store();
$oldOrderNR = $order->attribute('order_nr');
$order->activate();
$this->assertEquals($oldOrderNR + 1, $order->attribute('id'));
$this->assertEquals(0, $order->attribute('is_temporary'));
}
示例2: createOrder
function createOrder()
{
// Make order
$productCollectionID = $this->attribute('productcollection_id');
$user = eZUser::currentUser();
$userID = $user->attribute('contentobject_id');
$time = time();
$order = new eZOrder(array('productcollection_id' => $productCollectionID, 'user_id' => $userID, 'is_temporary' => 1, 'created' => $time, 'status_id' => eZOrderStatus::PENDING, 'status_modified' => $time, 'status_modifier_id' => $userID));
$db = eZDB::instance();
$db->begin();
$order->store();
$orderID = $order->attribute('id');
$this->setAttribute('order_id', $orderID);
$this->store();
$db->commit();
return $order;
}