protected function getObject(){ $object = null; if( $order_id = $this->getProperty('order_id', null) AND $product_id = $this->getProperty('product_id', null) AND $myVar = $this->getProperty('myVar', 'null) ){ $object = $this->modx->getObject('OrderProduct', array( 'order_id' => $order_id, 'product_id'=> $product_id, 'warehouse' => $myVar, )); } return $object; }