• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP SC_Helper_Purchase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: array

 public function testGetPayments_存在する配送業者IDを指定した場合_結果が正しい順序で取得できる()
 {
     $deliv_id = '1001';
     $this->expected = array('1002', '1001');
     $helper = new SC_Helper_Purchase();
     $this->actual = $helper->getPayments($deliv_id);
     $this->verify('支払方法');
 }
开发者ID:Rise-Up-Cambodia,项目名称:Rise-Up,代码行数:8,代码来源:SC_Helper_Purchase_getPaymentsTest.php


示例2: array

 public function testGetDelivTime_存在する配送業者IDを指定した場合_結果が正しい順序で取得できる()
 {
     $deliv_id = '1001';
     $this->expected = array('1' => '午前', '2' => '午後');
     $helper = new SC_Helper_Purchase();
     $this->actual = $helper->getDelivTime($deliv_id);
     $this->verify('お届け時間');
 }
开发者ID:Rise-Up-Cambodia,项目名称:Rise-Up,代码行数:8,代码来源:SC_Helper_Purchase_getDelivTimeTest.php


示例3: SC_Helper_Purchase

 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();
 }
开发者ID:Rise-Up-Cambodia,项目名称:Rise-Up,代码行数:9,代码来源:SC_Helper_Purchase_extractShippingTest.php


示例4: SC_Helper_Purchase

 public function testGetPaymentsByPaymentsId_削除されている支払IDを指定した場合_結果が空になる()
 {
     $payment_id = '1002';
     // 削除済みのID
     $this->expected = null;
     $helper = new SC_Helper_Purchase();
     $this->actual = $helper->getPaymentsByPaymentsId($payment_id);
     $this->verify('支払方法');
 }
开发者ID:Rise-Up-Cambodia,项目名称:Rise-Up,代码行数:9,代码来源:SC_Helper_Purchase_getPaymentsByPaymentsIdTest.php


示例5: array

 public function testCopyFromOrder_接頭辞・キーを設定した場合_指定の値でコピーされる()
 {
     $dest = array();
     $src = array('input_name01' => '姓', 'input_name02' => '名', 'input_zip01' => '012');
     $this->expected = array('output_name01' => '姓', 'output_name02' => '名');
     $helper = new SC_Helper_Purchase();
     $helper->copyFromOrder($dest, $src, 'output', 'input', array('name01', 'name02'));
     $this->actual = $dest;
     $this->verify();
 }
开发者ID:rocky-ice-cream,项目名称:003_eccube_test,代码行数:10,代码来源:SC_Helper_Purchase_copyFromOrderTest.php


示例6: SC_Helper_Purchase

 public function testGetPaymentsByPrice_購入金額がすべての下限を下回る場合_下限の設定がないものだけ取得できる()
 {
     $deliv_id = '1003';
     $total = 9999;
     $helper = new SC_Helper_Purchase();
     $this->expected = array('3002', '3004');
     $result = $helper->getPaymentsByPrice($total, $deliv_id);
     $this->actual = Test_Utils::mapCols($result, 'payment_id');
     $this->verify();
 }
开发者ID:Rise-Up-Cambodia,项目名称:Rise-Up,代码行数:10,代码来源:SC_Helper_Purchase_getPaymentsByPriceTest.php


示例7: array

 public function testGetShippings_商品取得フラグをOFFにした場合_結果に商品情報が含まれない()
 {
     $order_id = '1001';
     $this->expected['count'] = 1;
     $this->expected['first'] = array('order_id' => '1001', 'shipping_id' => '1', 'shipping_name01' => '配送情報01', 'shipping_date' => '2012-01-12 00:00:00');
     $this->expected['shipment_item_count'] = 0;
     $helper = new SC_Helper_Purchase();
     $result = $helper->getShippings($order_id, false);
     $this->actual['count'] = count($result);
     // shipping_idごとの配列になっているのでshipping_idで抽出
     $this->actual['first'] = Test_Utils::mapArray($result['1'], array('order_id', 'shipping_id', 'shipping_name01', 'shipping_date'));
     $this->actual['shipment_item_count'] = count($result['1']['shipment_item']);
     $this->verify('配送情報');
 }
开发者ID:casan,项目名称:eccube-2_13,代码行数:14,代码来源:SC_Helper_Purchase_getShippingsTest.php


示例8: SC_Helper_Purchase

 public function testClearShipmentItem_商品情報が配列でない場合_何も変更されない()
 {
     $this->setUpShipping($this->getMultipleShipping());
     // 内容を配列でないように変更
     $_SESSION['shipping']['00001'] = 'temp';
     $helper = new SC_Helper_Purchase();
     $helper->clearShipmentItemTemp('00001');
     // '00001'は配列でないので全体を取得
     $this->expected = array('00001' => 'temp', '00002' => array('商品2'), '00003' => array());
     $this->actual['00001'] = $_SESSION['shipping']['00001'];
     $this->actual['00002'] = $_SESSION['shipping']['00002']['shipment_item'];
     $this->actual['00003'] = $_SESSION['shipping']['00003']['shipment_item'];
     $this->verify('配送商品');
 }
开发者ID:casan,项目名称:eccube-2_13,代码行数:14,代码来源:SC_Helper_Purchase_clearShipmentItemTempTest.php


示例9: array

 public function testGetDeliv_存在する商品種別IDを指定した場合_結果が正しい順序で取得できる()
 {
     $product_type_id = '1001';
     $this->expected['count'] = 2;
     $this->expected['first'] = array('deliv_id' => '1002', 'product_type_id' => '1001', 'name' => '配送業者02', 'rank' => '3');
     $this->expected['second'] = array('deliv_id' => '1001', 'product_type_id' => '1001', 'name' => '配送業者01', 'rank' => '2');
     $helper = new SC_Helper_Purchase();
     $result = $helper->getDeliv($product_type_id);
     $this->actual['count'] = count($result);
     $cols = array('deliv_id', 'product_type_id', 'name', 'rank');
     $this->actual['first'] = Test_Utils::mapArray($result[0], $cols);
     $this->actual['second'] = Test_Utils::mapArray($result[1], $cols);
     $this->verify('配送業者');
 }
开发者ID:Rise-Up-Cambodia,项目名称:Rise-Up,代码行数:14,代码来源:SC_Helper_Purchase_getDelivTest.php


示例10: completeOrder

 /**
  * 受注を完了する.
  *
  * 下記のフローで受注を完了する.
  *
  * 1. トランザクションを開始する
  * 2. カートの内容を検証する.
  * 3. 受注一時テーブルから受注データを読み込む
  * 4. ユーザーがログインしている場合はその他の発送先へ登録する
  * 5. 受注データを受注テーブルへ登録する
  * 6. トランザクションをコミットする
  *
  * 実行中に, 何らかのエラーが発生した場合, 処理を中止しエラーページへ遷移する
  *
  * 決済モジュールを使用する場合は対応状況を「決済処理中」に設定し,
  * 決済完了後「新規受付」に変更すること
  *
  * @param integer $orderStatus 受注処理を完了する際に設定する対応状況
  * @return void
  */
 function completeOrder($orderStatus = ORDER_NEW)
 {
     $objQuery =& SC_Query_Ex::getSingletonInstance();
     $objSiteSession = new SC_SiteSession_Ex();
     $objCartSession = new SC_CartSession_Ex();
     $objCustomer = new SC_Customer_Ex();
     $customerId = $objCustomer->getValue('customer_id');
     $objQuery->begin();
     if (!$objSiteSession->isPrePage()) {
         SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, $objSiteSession);
     }
     $uniqId = $objSiteSession->getUniqId();
     $this->verifyChangeCart($uniqId, $objCartSession);
     $orderTemp = $this->getOrderTemp($uniqId);
     $orderTemp['status'] = $orderStatus;
     $cartkey = $objCartSession->getKey();
     $order_id = $this->registerOrderComplete($orderTemp, $objCartSession, $cartkey);
     $isMultiple = SC_Helper_Purchase::isMultiple();
     $shippingTemp =& $this->getShippingTemp($isMultiple);
     foreach ($shippingTemp as $shippingId => $val) {
         $this->registerShipmentItem($order_id, $shippingId, $val['shipment_item']);
     }
     $this->registerShipping($order_id, $shippingTemp);
     $objQuery->commit();
     //会員情報の最終購入日、購入合計を更新
     if ($customerId > 0) {
         SC_Customer_Ex::updateOrderSummary($customerId);
     }
     $this->cleanupSession($order_id, $objCartSession, $objCustomer, $cartkey);
     GC_Utils_Ex::gfPrintLog('order complete. order_id=' . $order_id);
 }
开发者ID:nassos9090,项目名称:plugin,代码行数:51,代码来源:SC_Helper_Purchase.php


示例11: array

 public function testGetShippingPref_保有フラグがONの場合_商品のある配送情報のみ取得する()
 {
     $this->setUpShipping($this->getMultipleShipping());
     $this->expected = array('東京都', '沖縄県');
     $this->actual = SC_Helper_Purchase::getShippingPref(TRUE);
     $this->verify('配送先の都道府県');
 }
开发者ID:ryoogata,项目名称:eccube-SQLAzureSupport-plugin,代码行数:7,代码来源:SC_Helper_Purchase_getShippingPrefTest.php


示例12: array

 public function testGetOrderDetail_ステータス取得フラグがOFFのの場合_ステータス以外の情報が取得できる()
 {
     $order_id = '1001';
     $this->expected = array(array('product_id' => '1002', 'product_class_id' => '1002', 'product_type_id' => '2', 'product_code' => 'pc1002', 'product_name' => '製品名1002', 'classcategory_name1' => 'cat10021', 'classcategory_name2' => 'cat10022', 'price' => '3000', 'quantity' => '10', 'point_rate' => '5', 'enable' => '0', 'effective' => '1', 'tax_rate' => '5', 'tax_rule' => '0'), array('product_id' => '1001', 'product_class_id' => '1001', 'product_type_id' => '1', 'product_code' => 'pc1001', 'product_name' => '製品名1001', 'classcategory_name1' => 'cat10011', 'classcategory_name2' => 'cat10012', 'price' => '4000', 'quantity' => '15', 'point_rate' => '6', 'enable' => '1', 'effective' => '1', 'tax_rate' => '3', 'tax_rule' => '1'));
     $this->actual = SC_Helper_Purchase::getOrderDetail($order_id, false);
     $this->verify();
 }
开发者ID:rocky-ice-cream,项目名称:003_eccube_test,代码行数:7,代码来源:SC_Helper_Purchase_getOrderDetailTest.php


示例13: array

 public function testGetShippingTemp_保有フラグがONの場合_商品のある情報のみ取得する()
 {
     $this->setUpShipping($this->getMultipleShipping());
     $this->expected = array('00001' => array('shipment_id' => '00001', 'shipment_item' => array('商品1'), 'shipping_pref' => '東京都'), '00002' => array('shipment_id' => '00002', 'shipment_item' => array('商品2'), 'shipping_pref' => '沖縄県'));
     $this->actual = SC_Helper_Purchase::getShippingTemp(TRUE);
     $this->verify('配送情報');
 }
开发者ID:ryoogata,项目名称:eccube-SQLAzureSupport-plugin,代码行数:7,代码来源:SC_Helper_Purchase_getShippingTempTest.php


示例14: array

 public function testGetOrderTemp_存在する受注IDを指定した場合_対応する結果が取得できる()
 {
     $order_temp_id = '1002';
     $this->expected = array('order_temp_id' => '1002', 'customer_id' => '1002', 'order_name01' => '受注情報02');
     $result = SC_Helper_Purchase::getOrderTemp($order_temp_id);
     $this->actual = Test_Utils::mapArray($result, array('order_temp_id', 'customer_id', 'order_name01'));
     $this->verify();
 }
开发者ID:Rise-Up-Cambodia,项目名称:Rise-Up,代码行数:8,代码来源:SC_Helper_Purchase_getOrderTempTest.php


示例15: array

 public function testUnsetShippingTemp__配送情報が全て破棄される()
 {
     SC_Helper_Purchase::unsetShippingTemp(TRUE);
     $this->expected = array('shipping' => TRUE, 'multiple_temp' => TRUE);
     $this->actual['shipping'] = empty($_SESSION['shipping']);
     $this->actual['multiple_temp'] = empty($_SESSION['multiple_temp']);
     $this->verify('セッション情報が空かどうか');
 }
开发者ID:casan,项目名称:eccube-2_13,代码行数:8,代码来源:SC_Helper_Purchase_unsetShippingTempTest.php


示例16: array

 public function testSetDownloadableFlgTo_ダウンロード期限外かつ入金日なしの場合_フラグがOFFになる()
 {
     $input = array('1001' => array('price' => 1000, 'effective' => '0', 'payment_date' => null));
     $this->expected = false;
     SC_Helper_Purchase::setDownloadableFlgTo($input);
     $this->actual = $input['1001']['is_downloadable'];
     $this->verify('ダウンロード可能フラグ設定結果');
 }
开发者ID:Rise-Up-Cambodia,项目名称:Rise-Up,代码行数:8,代码来源:SC_Helper_Purchase_setDownloadableFlgToTest.php


示例17: array

 public function testUnsetOneShippingTemp__指定したIDの配送情報のみが破棄される()
 {
     $this->setUpShipping($this->getMultipleShipping());
     SC_Helper_Purchase::unsetOneShippingTemp('00002');
     $this->expected = array('00001' => array('shipment_id' => '00001', 'shipment_item' => array('商品1'), 'shipping_pref' => '東京都'), '00003' => array('shipment_id' => '00003', 'shipment_item' => array(), 'shipping_pref' => '埼玉県'));
     $this->actual = $_SESSION['shipping'];
     $this->verify('配送情報');
 }
开发者ID:Rise-Up-Cambodia,项目名称:Rise-Up,代码行数:8,代码来源:SC_Helper_Purchase_unsetOneShippingTest.php


示例18: array

 public function testRegisterOrderDetail_該当の受注が存在しない場合_新しい情報が追加登録される()
 {
     $params = array(array('order_id' => '1003', 'hoge' => '999', 'product_id' => '9003', 'product_class_id' => '9003', 'product_name' => '製品名9003'));
     SC_Helper_Purchase::registerOrderDetail('1003', $params);
     $this->expected['count'] = '4';
     $this->expected['content'] = array('order_id' => '1003', 'product_id' => '9003', 'product_class_id' => '9003', 'product_name' => '製品名9003', 'product_code' => null);
     $this->actual['count'] = $this->objQuery->count('dtb_order_detail');
     $result = $this->objQuery->select('order_id, product_id, product_class_id, product_name, product_code', 'dtb_order_detail', 'order_id = ?', array('1003'));
     $this->actual['content'] = $result[0];
     $this->verify();
 }
开发者ID:Rise-Up-Cambodia,项目名称:Rise-Up,代码行数:11,代码来源:SC_Helper_Purchase_registerOrderDetailTest.php


示例19: array

 public function testSaveShippingTemp_元々存在する配送先IDの場合_情報がマージされる()
 {
     $this->setUpShipping($this->getMultipleShipping());
     SC_Helper_Purchase::saveShippingTemp(array('shipment_item' => '商品4', 'shipping_pref' => '大阪府'), '00001');
     $this->expected = array('count' => 3, 'shipping_id' => '00001', 'shipment_item' => array('商品1'), 'shipping_pref' => '大阪府');
     $this->actual['count'] = count($_SESSION['shipping']);
     $this->actual['shipping_id'] = $_SESSION['shipping']['00001']['shipping_id'];
     $this->actual['shipment_item'] = $_SESSION['shipping']['00001']['shipment_item'];
     $this->actual['shipping_pref'] = $_SESSION['shipping']['00001']['shipping_pref'];
     $this->verify('更新した配送情報');
 }
开发者ID:Rise-Up-Cambodia,项目名称:Rise-Up,代码行数:11,代码来源:SC_Helper_Purchase_saveShippingTempTest.php


示例20: SC_Helper_Purchase

 public function testCleanupSession__カートとセッションの配送情報が削除される()
 {
     // 引数の準備
     $helper = new SC_Helper_Purchase();
     $cartSession = new SC_CartSession();
     $customer = new SC_Customer();
     // 削除前のデータを設定
     $cartSession->addProduct('1001', 5);
     // product_type_id=1
     $cartSession->addProduct('1002', 10);
     // product_type_id=2
     $_SESSION['site']['uniqid'] = '100001';
     $helper->cleanupSession('1001', $cartSession, $customer, '1');
     $this->expected = array('cart_max_deleted' => 0, 'cart_max_notdeleted' => 1, 'uniqid' => '', 'shipping' => null, 'multiple_temp' => null);
     $this->actual['cart_max_deleted'] = $cartSession->getMax('1');
     $this->actual['cart_max_notdeleted'] = $cartSession->getMax('2');
     $this->actual['uniqid'] = $_SESSION['site']['uniqid'];
     $this->actual['shipping'] = $_SESSION['shipping'];
     $this->actual['multiple_temp'] = $_SESSION['multiple_temp'];
     $this->verify();
 }
开发者ID:casan,项目名称:eccube-2_13,代码行数:21,代码来源:SC_Helper_Purchase_cleanupSessionTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP SC_Helper_Purchase_Ex类代码示例发布时间:2022-05-23
下一篇:
PHP SC_Helper_DB_Ex类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap