File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,26 @@ public function __construct(
2121 }
2222
2323 public function loadWalletsByBasket (Customer $ customer , BasketDtoInterface $ basketDto ): void
24+ {
25+ $ customerWallet = $ this ->castService ->getWallet ($ customer );
26+
27+ /** @var string|null $customerCurrency */
28+ $ customerCurrency = $ customerWallet ->meta ['currency ' ] ?? null ;
29+
30+ if ($ customerCurrency === null ) {
31+ $ this ->loadDefaultWallets ($ basketDto );
32+ return ;
33+ }
34+
35+ $ this ->loadCurrencyWallets ($ customerCurrency , $ basketDto );
36+ }
37+
38+ private function loadCurrencyWallets (string $ currency , BasketDtoInterface $ basketDto ): void
39+ {
40+ // todo: needs to be implemented
41+ }
42+
43+ private function loadDefaultWallets (BasketDtoInterface $ basketDto ): void
2444 {
2545 $ products = [];
2646 /** @var array<array-key, array<array-key, int|string>> $productGroupIds */
You can’t perform that action at this time.
0 commit comments