File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
app/code/Magento/Catalog/Model/Product/Option Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -190,27 +190,29 @@ public function getProduct()
190190 public function saveValues ()
191191 {
192192 foreach ($ this ->getValues () as $ value ) {
193- $ this ->isDeleted (false );
194- $ this ->setData (
193+ $ optionValue = clone $ this ;
194+ $ optionValue ->isDeleted (false );
195+
196+ $ optionValue ->setData (
195197 $ value
196198 )->setData (
197199 'option_id ' ,
198- $ this ->getOption ()->getId ()
200+ $ optionValue ->getOption ()->getId ()
199201 )->setData (
200202 'store_id ' ,
201- $ this ->getOption ()->getStoreId ()
203+ $ optionValue ->getOption ()->getStoreId ()
202204 );
203205
204- if ($ this ->getData ('is_delete ' ) == '1 ' ) {
205- if ($ this ->getId ()) {
206- $ this ->deleteValues ($ this ->getId ());
207- $ this ->delete ();
206+ if ($ optionValue ->getData ('is_delete ' ) == '1 ' ) {
207+ if ($ optionValue ->getId ()) {
208+ $ optionValue ->deleteValues ($ optionValue ->getId ());
209+ $ optionValue ->delete ();
208210 }
209211 } else {
210- $ this ->save ();
212+ $ optionValue ->save ();
211213 }
212214 }
213- //eof foreach()
215+
214216 return $ this ;
215217 }
216218
You can’t perform that action at this time.
0 commit comments