Bukimedia / PrestaSharp

CSharp .Net client library for the PrestaShop API via web service
GNU General Public License v3.0
155 stars 153 forks source link

Create customer #359

Closed miguelextremanet closed 5 years ago

miguelextremanet commented 5 years ago

Hello I need to create new customers from my ERP solution I am using this code to create. the customer is created in prestashop successfully created, but I am not able to login using the credential I used. email and password.

        Dim CFactory As Bukimedia.PrestaSharp.Factories.CustomerFactory = New Bukimedia.PrestaSharp.Factories.CustomerFactory(pagina_web_tienda & "/api", API_KEY_PRESTASHOP, "")
        Dim Cliente As Bukimedia.PrestaSharp.Entities.customer = New Bukimedia.PrestaSharp.Entities.customer
        Cliente.passwd = "123345678"
        Cliente.firstname = "jose"
        Cliente.lastname = "pepe"
        Cliente.email = "correo@lectronico.com"
        Cliente.id_shop = 1
        Cliente.id_gender = 1
        Cliente.id_default_group = 1
        Cliente.id_lang = 1
        CFactory.Add(Cliente)

thanks

mowcixo commented 5 years ago

Hello @miguelextremanet, that's why you didn't specify the active property, just add:

Cliente.active = 1

That's it.

miguelextremanet commented 5 years ago

thanks

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.