This repository was archived by the owner on Apr 29, 2019. It is now read-only.
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 @@ -202,27 +202,29 @@ public function getProduct()
202202 public function saveValues ()
203203 {
204204 foreach ($ this ->getValues () as $ value ) {
205- $ this ->isDeleted (false );
206- $ this ->setData (
205+ $ optionValue = clone $ this ;
206+ $ optionValue ->isDeleted (false );
207+
208+ $ optionValue ->setData (
207209 $ value
208210 )->setData (
209211 'option_id ' ,
210- $ this ->getOption ()->getId ()
212+ $ optionValue ->getOption ()->getId ()
211213 )->setData (
212214 'store_id ' ,
213- $ this ->getOption ()->getStoreId ()
215+ $ optionValue ->getOption ()->getStoreId ()
214216 );
215217
216- if ($ this ->getData ('is_delete ' ) == '1 ' ) {
217- if ($ this ->getId ()) {
218- $ this ->deleteValues ($ this ->getId ());
219- $ this ->delete ();
218+ if ($ optionValue ->getData ('is_delete ' ) == '1 ' ) {
219+ if ($ optionValue ->getId ()) {
220+ $ optionValue ->deleteValues ($ optionValue ->getId ());
221+ $ optionValue ->delete ();
220222 }
221223 } else {
222- $ this ->save ();
224+ $ optionValue ->save ();
223225 }
224226 }
225- //eof foreach()
227+
226228 return $ this ;
227229 }
228230
You can’t perform that action at this time.
0 commit comments