fond-of-spryker / mimic-customer-account
Mimic user accounts in Spryker
Installs: 16 393
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 1
Requires
- php: >=7.2
- spryker/checkout-extension: ^1.2.0
- spryker/customer: ^6.0.0 || ^7.0.0
- spryker/quote: ^1.0.0 || ^2.0.0
Requires (Dev)
- codeception/codeception: ^2.4
- codeception/mockery-module: ^0.2
- fond-of-codeception/spryker: dev-master
- mikey179/vfsstream: ^1.6
- php-coveralls/php-coveralls: ^2.1
- phpro/grumphp: ^0.14
- sebastian/phpcpd: ^4.0
- spryker/code-sniffer: ^0.12
This package is auto-updated.
Last update: 2024-11-17 10:21:25 UTC
README
This Spryker package allows to create environments where users don't log in but customer accounts exist.
The package contains two CheckoutDoSaveOrder
plugins to support that functionality.
One plugin is used to force the customer to register in the background and the other will update anonymous quotes when orders are done via rest-api.
Installation
composer require fond-of-spryker/mimic-customer-account
Plugin Structure
ForceRegisterCustomerOrderSavePlugin
Specification:
- Check if customer already exists in database
- Update customer transfer with existing id and reference
- Force isGuest to be false
The plugin needs to be initialized in your CheckoutDepenendcyProvider before the CustomerOrderSavePlugin.
UpdateGuestCartOrderSavePlugin
Specification:
- Validate if the quote is anonymous
- Update customer reference for quote identified by uuid
- Update quote transfer if quote has been updated
The plugin should be initialized in your CheckoutDepenendcyProvider after the CustomerOrderSavePlugin.