Implementation example for customer management framework

Hi There,

I’m currently trying to integrate the customer management framework and would like to offer a login and registration to the customer. I already read the documentation intensively and also checked the advanced demo. But I don’t want to have a sso login / registration but a simple one without sso.
So I started developing one just with symfony tools in an own bundle. Now I saw that there are some helpful tools offered by the CMF like a CustomerSaveManager but I cannot find information how to use them correctly.

Is there an example anywhere how to implement / integrate the customer management framework without sso and how to use the CustomerSaveManager correctly?

Thank you and kind regards,

Sonja

Hi,
the customer save manager should come into action, as soon as you use Pimcore data objects for your customers and setup the class definition properly.

Implementing a user login the symfony standard way is perfectly fine. And when you authenticate against a Pimcore data object Customer that is configured for the CMF, then you should be able to use all CMF functionality too.
There is some documentation for how to authenticate against Pimcore data objects in the Pimcore docs.

BR
Christian

Hi @Sonja,

You could also use the PimcoreMembersBundle, which comes with a standard symfony login, registration and other features and is also compatible with the CMF. I am using this combination in production successfully.

The following could be an example config for the CMF to use the CustomerSaveManager:

# Pimcore CMF
pimcore_customer_management_framework:
    general:
        customerPimcoreClass: 'Customer'
    encryption:
        secret: 'YOUR_SECRET'
    customer_provider:
        parentPath: '/Customer'
        archiveDir: '/Customer/_Archive'
        namingScheme: '{countryCode}/{zip}/{firstname}-{lastname}'
        newCustomersTempDir: 'Customer/_Temp'
    customer_save_manager:
        enableAutomaticObjectNamingScheme: true
    customer_save_validator:
        checkForDuplicates: true
        requiredFields:
            - ['email']
            - ['firstname', 'lastname']
    customer_duplicates_services:
        duplicateCheckFields:
            - ['email']
        duplicateCheckTrimmedFields:
            - 'email'

This enforces the defined naming scheme for your Customer objects and also checks the objects (compared field: email, required fields: email and firstname, lastname) for duplicates.

Hope this helps!

Hi Guys,

Thank you very much for your answers in this topic. I gave the combination members - CMF a second try (first time failed during installation problems) but with the installation guide posted above it works now. Now I will go deeper in configuration and testing of both.

Kind regards
Sonja

Did u manage to finish login register this way?