-
- 5,888 Posts
where do you want change the published value?
from grid at manager?
isn't there a context-menue with publish/unpublish (right-click into the grid)?
-
- 5,888 Posts
as soon as you have a field with name price in your formtabs and you have it in the includeTVList, the TV is automatically updated by the childresources-update-processor
It is done in this part:
if ($includeTVs) {
$c = $modx->newQuery('modTemplateVar');
$collection = $modx->getCollection('modTemplateVar', $c);
foreach ($collection as $tv) {
$tvname = $tv->get('name');
if (isset($data[$tvname])) {
$data['tv' . $tv->get('id')] = $data[$tvname];
unset($data[$tvname]);
}
}
$data['tvs'] = 1;
}
if ($scriptProperties['object_id'] == 'new') {
//$object = $modx->newObject($classname);
if (!empty($parent)){
$data['parent'] = $parent;
}
$response = $modx->runProcessor('resource/create', $data);
} else {
//$object = $modx->getObject($classname, $scriptProperties['object_id']);
//if (empty($object)) return $modx->error->failure($modx->lexicon('quip.thread_err_nf'));
$response = $modx->runProcessor('resource/update', $data);
}
-
- 85 Posts
I have one product with different colors (different number).
Red 5 units, and blue 3.
Let suppose that,a product with blue color is almost sold out and I have to change automatically the status of the publication of this color from my snippet, not from MIGX TV interfce in backend .
I can rewrite the whole JSON array that contains all information MIGX TV with xPDO or can it be done differently?