File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Controller/Adminhtml/Landingpage Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -107,13 +107,15 @@ public function execute()
107
107
$ data ['configuration ' ] = $ data ['algolia_configuration ' ];
108
108
if ($ this ->configHelper ->isCustomerGroupsEnabled ($ data ['store_id ' ])) {
109
109
$ configuration = json_decode ($ data ['algolia_configuration ' ], true );
110
- $ priceConfig = $ configuration ['price ' .$ data ['price_key ' ]];
111
- $ customerGroups = $ this ->customerGroupCollectionFactory ->create ();
112
- $ store = $ this ->storeManager ->getStore ($ data ['store_id ' ]);
113
- $ baseCurrencyCode = $ store ->getBaseCurrencyCode ();
114
- foreach ($ customerGroups as $ group ) {
115
- $ groupId = (int ) $ group ->getData ('customer_group_id ' );
116
- $ configuration ['price. ' .$ baseCurrencyCode .'.group_ ' .$ groupId ] = $ priceConfig ;
110
+ if (isset ($ configuration ['price ' .$ data ['price_key ' ]])) {
111
+ $ priceConfig = $ configuration ['price ' .$ data ['price_key ' ]];
112
+ $ customerGroups = $ this ->customerGroupCollectionFactory ->create ();
113
+ $ store = $ this ->storeManager ->getStore ($ data ['store_id ' ]);
114
+ $ baseCurrencyCode = $ store ->getBaseCurrencyCode ();
115
+ foreach ($ customerGroups as $ group ) {
116
+ $ groupId = (int ) $ group ->getData ('customer_group_id ' );
117
+ $ configuration ['price. ' .$ baseCurrencyCode .'.group_ ' .$ groupId ] = $ priceConfig ;
118
+ }
117
119
}
118
120
$ data ['configuration ' ] = json_encode ($ configuration );
119
121
}
You can’t perform that action at this time.
0 commit comments