Created
November 26, 2019 08:44
-
-
Save crystaldaking/d6bb163b1691440df1786cfda7459387 to your computer and use it in GitHub Desktop.
запись опций
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
В схеме данных minishop2 ДЛЯ ДОЛБАЕБОВ НАПИСАНО | |
<object class="msProduct" extends="modResource"> | |
.............................. | |
<composite alias="Options" class="msProductOption" local="id" foreign="product_id" cardinality="many" | |
owner="local"/> | |
</object> | |
Поэтому ваш код должен быть ПРИМЕРНО БЛЯТЬ ТАКИМ | |
foreach ($resources as $res) { | |
$data = $res->getMany('Options'); | |
foreach ($data as $opt) { | |
............. | |
$opt->save(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment