バージョン選択

フォーラム

メニュー

オンライン状況

58 人のユーザが現在オンラインです。 (49 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 58
もっと...

サイト内検索

質問 > 管理機能 > 配送CSVをダウンロード後に受注ステータス変更したい

管理機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
h_tanaka
投稿日時: 2018/1/18 10:47
対応状況: −−−
登録日: 2016/7/22
居住地: 愛媛県
投稿: 1646
Re: 配送CSVをダウンロード後に受注ステータス変更したい
tsuji 様

上記 ★3 の箇所に次のコードを挿入してみたのですが、次のエラーになってしまいます。。

■エラー
[2018-01-18 10:16:52,243055] admin.ERROR [f448b3c3] [5892b798] [2] [LogListener:onKernelException:115] - Doctrine\ORM\ORMInvalidArgumentException: A new entity was found through the relationship 'Eccube\Entity\Shipping#Order' that was not configured to cascade persist operations for entity: Eccube\Entity\Order@000000007463c263000000007d60586b. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}). If you cannot find out which entity causes the problem implement 'Eccube\Entity\Order#__toString()' to get a clue. (uncaught exception) at /usr/home/fa2002002/html/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php line 91 {"exception":"[object] (Doctrine\\ORM\\ORMInvalidArgumentException(code: 0): A new entity was found through the relationship 'Eccube\\Entity\\Shipping#Order' that was not configured to cascade persist operations for entity: Eccube\\Entity\\Order@000000007463c263000000007d60586b. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={\"persist\"}). If you cannot find out which entity causes the problem implement 'Eccube\\Entity\\Order#__toString()' to get a clue. at /usr/home/fa2002002/html/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php:91)"} [GET, /ecadmin/order/export/shipping?, 210.131.156.102, https://livingut.shop/ecadmin/order, Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36]

■挿入したコード
        // 受注データ検索用のクエリビルダを取得.
        $qb = $app['eccube.service.csv.export']
                ->getOrderQueryBuilder($request);

        $qb->select('o.id');

        if ($result = $qb->getQuery()->getResult(Query::HYDRATE_ARRAY)) {
            $orderRepository = $app['orm.em']->getRepository('Eccube\Entity\Order');
            $Status = $app['eccube.repository.order_status']->find(5);
            foreach ($result as $val) {
                $status = $this->getStatus($val['id'], $app);
                if (in_array($status, 1)) {
                    $orderRepository->changeStatus($val['id'], $Status);
                }
            }
        }


----------------
EC-CUBE 《プラチナ》ランクパートナー
トエビス株式会社 田中 宏典
EC-CUBEの機能やデザインのカスタマイズ承ります。

フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   配送CSVをダウンロード後に受注ステータス変更したい h_tanaka 2018/1/10 16:07
     Re: 配送CSVをダウンロード後に受注ステータス変更したい tsuji 2018/1/11 11:14
       Re: 配送CSVをダウンロード後に受注ステータス変更したい h_tanaka 2018/1/11 11:22
         Re: 配送CSVをダウンロード後に受注ステータス変更したい tsuji 2018/1/11 11:44
         » Re: 配送CSVをダウンロード後に受注ステータス変更したい h_tanaka 2018/1/18 10:47
             Re: 配送CSVをダウンロード後に受注ステータス変更したい tsuji 2018/1/25 13:41
               Re: 配送CSVをダウンロード後に受注ステータス変更したい h_tanaka 2018/1/25 17:30

 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,985名です
総投稿数は110,019件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2314
5
umebius
2085
6
yuh
1819
7
h_tanaka
1646
8
red
1570
9
mcontact
1296
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.