PHP code example of fond-of-spryker / customer

1. Go to this page and download the library: Download fond-of-spryker/customer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fond-of-spryker / customer example snippets


namespace Pyz\Zed\Customer;

use Generated\Shared\Transfer\SequenceNumberSettingsTransfer;
use FondOfSpryker\Shared\Customer\CustomerConstants;
use Spryker\Zed\Customer\CustomerConfig as BaseCustomerConfig;

class CustomerConfig extends BaseCustomerConfig
{
    /**
     * @return \Generated\Shared\Transfer\SequenceNumberSettingsTransfer
     */
    public function getCustomerReferenceDefaults()
    {
        $sequenceNumberSettingsTransfer = new SequenceNumberSettingsTransfer();

        $sequenceNumberSettingsTransfer->setName(CustomerConstants::NAME_CUSTOMER_REFERENCE);

        $sequenceNumberPrefixParts = [];
        $sequenceNumberPrefixParts[] = $this->get(CustomerConstants::CUSTOMER_REFERENCE_PREFIX);

        $prefix = implode($this->getUniqueIdentifierSeparator(), $sequenceNumberPrefixParts) . $this->getUniqueIdentifierSeparator();

        $sequenceNumberSettingsTransfer->setPrefix($prefix);
        $sequenceNumberSettingsTransfer->setOffset($this->get(CustomerConstants::CUSTOMER_REFERENCE_OFFSET));

        return $sequenceNumberSettingsTransfer;
    }
}