Ajax Call: Problem with filter in Article & Articles Model in Module Context

I currently have a problem with an ajax call in my new module. the filters are not used. Here is an extract of the relevant lines: $articleid = $data_decoded->articleid; // Get an instance of the generic articles model require_once(JPATH_ADMINISTRATOR . ‘/components/com_content/models/articles.php’); $model = JModelLegacy::getInstance(‘Articles’, ‘ContentModel’, array(‘ignore_request’ => true)); $model->setState(‘filter.article_id’, $articleid); return $model->getItems(); $articleid contains the…

Details

How can I access the Gateways services?

I have been trying to access craft\commerce\services\Gateways; from a plugin but I can’t figure out how I need to access it. I’ve used the following: $gateways = Commerce::getInstance()->commerce->getAllGateways(); $gateways = craft\commerce\services\Gateways::getAllGateways(); The first one says Getting unknown property: craft\commerce\Plugin::commerce and the second one tells me Non-static method craft\commerce\services\Gateways::getAllGateways() should not be called statically Can anyone…

Details