本文整理汇总了PHP中SC_Helper_Purchase::extractShipping方法的典型用法代码示例。如果您正苦于以下问题:PHP SC_Helper_Purchase::extractShipping方法的具体用法?PHP SC_Helper_Purchase::extractShipping怎么用?PHP SC_Helper_Purchase::extractShipping使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SC_Helper_Purchase
的用法示例。
在下文中一共展示了SC_Helper_Purchase::extractShipping方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
public function testExtractShipping__予め指定されたキーだけが抽出される()
{
$helper = new SC_Helper_Purchase();
$helper->arrShippingKey = array('id', 'name', 'code');
$arrSrc = array('shipping_id' => '1001', 'shipping_code' => 'cd1001', 'shipping_detail' => 'dt1001', 'shipping_name' => '名称1001');
$this->expected = array('shipping_id' => '1001', 'shipping_name' => '名称1001', 'shipping_code' => 'cd1001');
$this->actual = $helper->extractShipping($arrSrc);
$this->verify();
}
示例2: lfRegistData
/**
* データの一時登録を行う.
*
* 非会員向けの処理
* @param integer $uniqid 受注一時テーブルのユニークID
* @param SC_Helper_Purchase $objPurchase SC_Helper_Purchase インスタンス
* @param SC_Customer $objCustomer SC_Customer インスタンス
* @param SC_FormParam $objFormParam SC_FormParam インスタンス
* @param boolean $isMultiple 複数配送の場合 true
*/
function lfRegistData($uniqid, &$objPurchase, &$objCustomer, &$objFormParam, $isMultiple = false)
{
$arrParams = $objFormParam->getHashArray();
// 注文者をお届け先とする配列を取得
$arrShippingOwn = array();
$objPurchase->copyFromOrder($arrShippingOwn, $arrParams);
// 都度入力されたお届け先
$arrShipping = $objPurchase->extractShipping($arrParams);
if ($isMultiple) {
$objPurchase->unsetOneShippingTemp(0);
$objPurchase->unsetOneShippingTemp(1);
$objPurchase->saveShippingTemp($arrShippingOwn, 0);
if ($arrParams['deliv_check'] == '1') {
$objPurchase->saveShippingTemp($arrShipping, 1);
}
} else {
$objPurchase->unsetAllShippingTemp(true);
if ($arrParams['deliv_check'] == '1') {
$objPurchase->saveShippingTemp($arrShipping, 1);
} else {
$objPurchase->saveShippingTemp($arrShippingOwn, 0);
}
}
$arrValues = $objFormParam->getDbArray();
// 登録データの作成
$arrValues['order_birth'] = SC_Utils_Ex::sfGetTimestamp($arrParams['year'], $arrParams['month'], $arrParams['day']);
$arrValues['update_date'] = 'CURRENT_TIMESTAMP';
$arrValues['customer_id'] = '0';
$objPurchase->saveOrderTemp($uniqid, $arrValues, $objCustomer);
}