File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 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)
120120 if (!empty ($ data ['store_id ' ])) {
121121 $ item ->setStoreId ((int )$ data ['store_id ' ]);
122122 $ item ->setData ('data_to_update ' , $ data );
123+ } else {
124+ $ item ->setStoreId (0 );
123125 }
124126
125127 $ item ->load ($ id );
@@ -176,11 +178,7 @@ public function get($id, $storeId = 0)
176178 {
177179 try {
178180 $ item = $ this ->_itemFactory ->create ();
179-
180- if ($ storeId ) {
181- $ item ->setStoreId ((int )$ storeId );
182- }
183-
181+ $ item ->setStoreId ((int )$ storeId );
184182 $ item ->load ($ id );
185183
186184 if (!$ item ->getId ()) {
@@ -203,11 +201,7 @@ public function view($id, $storeId)
203201 {
204202 try {
205203 $ item = $ this ->_itemFactory ->create ();
206-
207- if ($ storeId ) {
208- $ item ->setStoreId ((int )$ storeId );
209- }
210-
204+ $ item ->setStoreId ((int )$ storeId );
211205 $ item ->getResource ()->load ($ item , $ id );
212206
213207 if (!$ item ->isVisibleOnStore ($ storeId )) {
You can’t perform that action at this time.
0 commit comments