fond-of-spryker / customer
Installs: 17 499
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- spryker-shop/checkout-page: ^1.2.0
- spryker-shop/customer-page: ^1.2.0
- spryker/customer: ^7.10.2
- spryker/glossary: ^3.0.0
- spryker/kernel: ^3.0.0
- spryker/zed-request: ^3.0.0
Requires (Dev)
- codeception/codeception: ^2.3
- mikey179/vfsstream: ^1.6
- php-coveralls/php-coveralls: ^2.0
- phpro/grumphp: ^0.14
- sebastian/phpcpd: ^4.0
- spryker/application: ^3.0.0
- spryker/code-sniffer: ^0.11
- spryker/kernel: ^3.0.0
This package is auto-updated.
Last update: 2024-10-14 14:15:12 UTC
README
Removes the customer registration from checkout. Every Customer will be saved after placing order. On another order form the same customer the email address will be matched. So you get a history of all orders from the same customer in ZED
You need to implement 3 packages:
- fond-of-spryker/checkout-page
- fond-of-spryker/customer-page
- fond-of-spryker/customer
Install
All packages are depended on each other
composer require fond-of-spryker/customer
Configuration
Extend the existing CheckoutPageDependencyProvider with the new one from fond-of-spryker/checkout-page:
namespace Pyz\Yves\CheckoutPage;;
use FondOfSpryker\Yves\CheckoutPage\CheckoutPageDependencyProvider as FondOfSprykerCheckoutPageDependencyProvider;
class CheckoutPageDependencyProvider extends FondOfSprykerCheckoutPageDependencyProvider
Go to the YvesBootstrap.php and replace the provider Plugin:
use SprykerShop\Yves\CheckoutPage\Plugin\Provider\CheckoutPageControllerProvider;
use FondOfSpryker\Yves\CheckoutPage\Plugin\Provider\CheckoutPageControllerProvider;
At next, do the same with CustomerPageDependencyProvider:
namespace Pyz\Yves\CustomerPage;
use FondOfSpryker\Yves\CustomerPage\CustomerPageDependencyProvider as FondOfSprykerCustomerPageDependencyProvider;
class CustomerPageDependencyProvider extends FondOfSprykerCustomerPageDependencyProvider
At least we need to configure ZED:
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;
}
}