File tree 1 file changed +4
-10
lines changed 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,8 @@ public function update($id, $data)
120
120
if (!empty ($ data ['store_id ' ])) {
121
121
$ item ->setStoreId ((int )$ data ['store_id ' ]);
122
122
$ item ->setData ('data_to_update ' , $ data );
123
+ } else {
124
+ $ item ->setStoreId (0 );
123
125
}
124
126
125
127
$ item ->load ($ id );
@@ -176,11 +178,7 @@ public function get($id, $storeId = 0)
176
178
{
177
179
try {
178
180
$ item = $ this ->_itemFactory ->create ();
179
-
180
- if ($ storeId ) {
181
- $ item ->setStoreId ((int )$ storeId );
182
- }
183
-
181
+ $ item ->setStoreId ((int )$ storeId );
184
182
$ item ->load ($ id );
185
183
186
184
if (!$ item ->getId ()) {
@@ -203,11 +201,7 @@ public function view($id, $storeId)
203
201
{
204
202
try {
205
203
$ item = $ this ->_itemFactory ->create ();
206
-
207
- if ($ storeId ) {
208
- $ item ->setStoreId ((int )$ storeId );
209
- }
210
-
204
+ $ item ->setStoreId ((int )$ storeId );
211
205
$ item ->getResource ()->load ($ item , $ id );
212
206
213
207
if (!$ item ->isVisibleOnStore ($ storeId )) {
You can’t perform that action at this time.
0 commit comments