バージョン選択

フォーラム

メニュー

オンライン状況

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

サイト内検索

質問 > フロント機能 > OrderHelper.phpのカスタマイズでエラー

フロント機能

新規スレッドを追加する

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
kazz_oga
投稿日時: 2021/1/29 12:13
対応状況: 確認中
一人前
登録日: 2013/8/5
居住地: 東京都北区赤羽西
投稿: 144
OrderHelper.phpのカスタマイズでエラー
▼テンプレート
[EC-CUBE] 4.05
[レンタルサーバ] local環境
[OS] MacOS 10.15.7
[PHP] 7.4
[データベース] MySQL 5.7
[WEBサーバ] Apache 2.4
[ブラウザ] safari 14.0
[導入プラグインの有無] なし
[カスタマイズの有無] あり
[現象]
次の記事を参考にして、OrderHelper.phpをカスタマイズを行なっています。
https://kumahiyo.com/extend-service/

エラーが出て、解決策が分からず困っています。
ご教授をお願いしたいのですが

<エラー>

Type error: Argument 1 passed to Eccube\Service\OrderHelper::__construct() must implement interface Symfony\Component\DependencyInjection\ContainerInterface, string given, called in /Users/xxxxxxx/localhost/htdocs/eccube-4/var/cache/dev/ContainerYoogxyc/getOrderHelperServiceCustomizerService.php on line 12


<service.yamlに追加>

Customize\Service\OrderHelperServiceCustomizer:
decorates: Eccube\Service\OrderHelper
arguments:
- ‘@Eccube\Common\EccubeConfig’


<Customize/Service/OrderHelperServiceCustomizer.php>

namespace Customize\Service;

use Eccube\Service\OrderHelper;
use Eccube\Entity\Shipping;

class OrderHelperServiceCustomizer extends OrderHelper
{

/**
* @param Shipping $Shipping
*/
protected function setDefaultDelivery(Shipping $Shipping)
{
カスタマイズした内容
}
}

<var/...../getOrderHelperServiceCustomizerService.phpの12行目>

return $this->services['Customize\\Service\\OrderHelperServiceCustomizer'] = new \Customize\Service\OrderHelperServiceCustomizer('‘@Eccube\\Common\\EccubeConfig’', ${($_ = isset($this->services['doctrine.orm.default_entity_manager']) ? $this->services['doctrine.orm.default_entity_manager'] : $this->getDoctrine_Orm_DefaultEntityManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Eccube\\Repository\\OrderRepository']) ? $this->services['Eccube\\Repository\\OrderRepository'] : $this->getOrderRepositoryService()) && false ?: '_'}, ${($_ = isset($this->services['Eccube\\Repository\\Master\\OrderItemTypeRepository']) ? $this->services['Eccube\\Repository\\Master\\OrderItemTypeRepository'] : $this->load('getOrderItemTypeRepositoryService.php')) && false ?: '_'}, ${($_ = isset($this->services['Eccube\\Repository\\Master\\OrderStatusRepository']) ? $this->services['Eccube\\Repository\\Master\\OrderStatusRepository'] : $this->load('getOrderStatusRepositoryService.php')) && false ?: '_'}, ${($_ = isset($this->services['Eccube\\Repository\\DeliveryRepository']) ? $this->services['Eccube\\Repository\\DeliveryRepository'] : $this->load('getDeliveryRepositoryService.php')) && false ?: '_'}, ${($_ = isset($this->services['Eccube\\Repository\\PaymentRepository']) ? $this->services['Eccube\\Repository\\PaymentRepository'] : $this->load('getPaymentRepositoryService.php')) && false ?: '_'}, ${($_ = isset($this->services['Eccube\\Repository\\Master\\DeviceTypeRepository']) ? $this->services['Eccube\\Repository\\Master\\DeviceTypeRepository'] : $this->getDeviceTypeRepositoryService()) && false ?: '_'}, ${($_ = isset($this->services['Eccube\\Repository\\Master\\PrefRepository']) ? $this->services['Eccube\\Repository\\Master\\PrefRepository'] : $this->load('getPrefRepositoryService.php')) && false ?: '_'}, ${($_ = isset($this->services['mobile_detect.mobile_detector.default']) ? $this->services['mobile_detect.mobile_detector.default'] : ($this->services['mobile_detect.mobile_detector.default'] = new \SunCat\MobileDetectBundle\DeviceDetector\MobileDetector())) && false ?: '_'}, ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->getSessionService()) && false ?: '_'});
kazz_oga
投稿日時: 2021/1/30 10:09
対応状況: 解決済
一人前
登録日: 2013/8/5
居住地: 東京都北区赤羽西
投稿: 144
Re: OrderHelper.phpのカスタマイズでエラー
service.yamlで次を削除したら、動きました。
<削除した記載>
arguments:
- ‘@Eccube\Common\EccubeConfig’

<参考>
https://laptrinhx.com/ec-cube4-servicekurasuorderhelperno-kuo-zhang-fang-fa-1209835736/

ありがとうございました
スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


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

統計情報

総メンバー数は88,282名です
総投稿数は109,688件です

投稿数ランキング

1
seasoft
7365
2
468
3217
3
AMUAMU
2712
4
nanasess
2303
5
umebius
2085
6
yuh
1818
7
h_tanaka
1610
8
red
1567
9
mcontact
1240
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
796
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.