-
Notifications
You must be signed in to change notification settings - Fork 4
Con 5203: Fix renaming variant options #474
Conversation
Components/VariantConfigurator.php
Outdated
| $detail->setConfiguratorOptions($detailOptions); | ||
| $this->manager->persist($detail); | ||
| $this->manager->persist($article); | ||
| $this->manager->persist($article); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warum zweimal persist?
Components/VariantConfigurator.php
Outdated
|
|
||
| $this->manager->flush(); | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zwei leere Zeilen
|
|
||
| $configSet->getOptions()->removeElement($detailOption); | ||
|
|
||
| $this->manager->flush(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
muss flush in jedem Schleifendurchlauf?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leider ja :(
| foreach ($options as $option) { | ||
| $optionCollection->removeElement($option); | ||
| } | ||
| $configSet->setOptions($options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does setOptions() append or does it overwrite the list of options?
i think it overrides and then the whole foreach is not necessary
| { | ||
| $connection = $this->manager->getConnection(); | ||
| $query = $connection->prepare( | ||
| 'SELECT option_id FROM s_article_configurator_set_option_relations WHERE option_id = :optionId UNION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

No description provided.