hi, ich versuche einen Customer wie folgt anzulegen.
$user_params = array(
'email' => $__order['User']['email'],
'groupKey' => 'AMZ',
'shopId' => $__order['User']['shopID'],
'paymentId' => 8,
'billing' => array(
"salutation" => $__order['OrderBillingAddress']['salutation'],
"firstName" => $__order['OrderBillingAddress']['firstname'],
"lastName" => $__order['OrderBillingAddress']['lastname'],
"company" => $__order['OrderBillingAddress']['company'],
"street" => $__order['OrderBillingAddress']['street'],
"zipCode" => $__order['OrderBillingAddress']['zipcode'],
"city" => $__order['OrderBillingAddress']['city'],
"country" => $__order['OrderBillingAddress']['countryID'],
),
'shipping' => array(
"salutation" => $__order['OrderBillingAddress']['salutation'],
"firstName" => $__order['OrderBillingAddress']['firstname'],
"lastName" => $__order['OrderBillingAddress']['lastname'],
"company" => $__order['OrderBillingAddress']['company'],
"street" => $__order['OrderBillingAddress']['street'],
"zipCode" => $__order['OrderBillingAddress']['zipcode'],
"city" => $__order['OrderBillingAddress']['city'],
"country" => $__order['OrderBillingAddress']['countryID'],
));
try {
if (empty($__order['User']['userID'])) {
$customer = $this->getShopwareCustomerResource()->create($user_params);
} else {
$customer = $this->getShopwareCustomerResource()->update(
$__order['User']['userID'],
$user_params
);
}
}catch(\Exception $e){
Shopware()->Pluginlogger()->info('ERROR ON USER IMPORT/UPDATE', array($user_params,$e));
}
Der User wird leider nicht angelegt. folgendes wird geloggt:
(Shopware\\Components\\Api\\Exception\\ValidationException(code: 0): at /www/htdocs/shopware/engine/Shopware/Bundle/AccountBundle/Service/Validator/CustomerValidator.php:99)"]
Also im Grunde wird kein Fehler ausgegeben aber es wird auch nichts angelegt. Alle Felder die Übergeben werden, sind gefüllt. Hat jemand eine Idee was hier nicht stimmt oder wie ich genauer debugen kann was hier nicht durch den Validator geht?