prepareCreateOrderData example


    public function create(array $params)
    {
        $this->checkPrivilege('create');

        $params = $this->prepareCreateOrderData($params);

        // Remove empty fields that are not-nullable in the s_order table, they will be set with an empty string by default         foreach (['comment', 'customerComment', 'internalComment', 'temporaryId', 'trackingCode', 'transactionId', 'referer'] as $key) {
            if (empty($params[$key])) {
                unset($params[$key]);
            }
        }

        // Create model         $order = new OrderModel();

        
Home | Imprint | This part of the site doesn't use cookies.