-
Notifications
You must be signed in to change notification settings - Fork 2
Design Principles
The Generic Ecommerce system was design to have each component relatively agnostic of the other elements, and each piece you can overwrite and adjust.
On the client side of things, Generic Ecommerce contains various repository classes (ecommerce.min.js) that are exposed through the InitializeEcommerceService(type) method. It also contains Event methods which generate CustomEvents.
Then it has the ecommerceEvents.js file which bridges the HTML and user interactions and executes logic on the various repositories.
It does this by using the ecommerce.min.js repository Event methods to dispatch events on the document.body. These events then caught and then the event parameters are used to call the proper method on the repository classes in ecommerce.min.js.
So the process goes:
- ecommerceEvents.js interacts with the HTML elements
- ecommerceEvents.js dispatches CustomEvents to the document.body, generated through the ecommerce.min.js's libraries
- ecommerceEvents.js watches these CustomEvents on the document.body, and calls the execution methods in the ecommerce.min.js's libraries
This allows you to initialize custom events yourself, or append/replace the listeners to these events and perform your own operations.
All operations done server-side are done through Interfaces which you can implement your own through dependency injection. Also all View paths are adjustable so you can implement your own Views as well.
- Installation / Setup
- Design Principle
- Basic Usage
- Operations and Interfaces
- Customization Points
- Creating Custom Payment Gateways