Last active
November 28, 2019 09:20
-
-
Save OlegShchavelev/89873ae686ab8a22ff8c2c2760d92c6a to your computer and use it in GitHub Desktop.
Консольные скрипты для редактирования
This file contains hidden or 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
$resources = $modx->getCollection('modResource',array('parent' => 22)); | |
foreach ($resources as $res) { | |
$res->set('class_key', msProduct); | |
$res->save(); | |
} |
This file contains hidden or 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
<?php | |
$resources = $modx->getIterator('msProductData', [ | |
'vendor' => 75 | |
]); | |
foreach ($resources as $resource) { | |
$resource->remove(); | |
echo "Удален ID: {$resource->id} --> ОК \r\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment