Hello,
for use in a separate admin panel I try to get the payment methods as list to place them in a combo menu.
My current code looks like:
require_once $modx->getOption('simplecart.core_path',null,$modx->getOption('core_path').'components/simplecart/').'model/simplecart/simplecart.class.php';
$simplecart = new SimpleCart($modx,$scriptProperties);
$query = $modx->newQuery('simpleCartMethod');
$where = array('type' => $type);
$query->where($where);
$query->select('id, name');
$scMethods = $modx->getCollection('simpleCartMethod', $query);
$output = $this->outputArray($scMethods);
return $output;
The result ist {“success”:true,“total”:“3”,“results”:}
The total value is correct, but I don’t get fields like name and id.
Thanks for help
Yours
Florian