... {toc} h1. Introduction Crafter Commerce will be a new extension to Crafter 2. It will be an online commerce engine that facilitates guided shopping experiences within an extensive product catalog with rich metadata. It will also interface with billing engines, payment gateways, CRM and analytics platforms. Crafter Commerce will be build around four main pillars, as shown below: !crafter-commerce-xmind-2.png|border=1! h1. Features Here is an overview of features that Crafter Commerce will support. *Account managent* * Customer profiles * Opt-in/opt-out * Address cleansing & validation *Pricing management* * Promotion codes * Royalty/referer codes * Quantity discount calculations * Promotion models (i.e. Buy one, get one free) *Order management* * Quotes ** Create (taking into consideration shipping and tax) ** Confirm ** Update * Orders ** History ** Status ** Cancelations ** Returns *List Management* * Payment types * Credit card types * Person titles * Shipping methods * States *Security* * Authentication * Authorization
|
h1. Implementation
|
Crafter Commerce is implemented as a Server and a Client component, which communicate with each other over HTTP through JSON or XML messages. The Server component is build as a Java web application with Spring, Mongo, Hibernate Validator, SolrJ as dependencies. The Client component is build as a Java library that can be embedded in any Java (web) application. It uses Spring REST support to interact with the Server over HTTP and perform marshalling and unmarshalling.
|
!crafter-commerce-impl.png|border=1!
|
|
h1. Entity Relationships
|
... !cc-entity-relationships.png|border=1! h1. Mongo Schema Design *collections:* # accounts # products ## promotions ## product-prices # orders ## payments ## order-line-items ## order-delivery # payment-gateways # shipping-methods # locations # addresses # attributes *atomic operations:* In Mongo, atomic operations can be performed *only* on a single BSON document. Needed when: # Adding a product to a shopping cart (if we manage inventory, so updating a product's available quantity should be atomic). # ... *indexes:* Identify the fields to index / query on # id (all collections) # key-name(s) (coll-name) # key-name(s) (coll-name) *sharding:* Not applicable at this time h1. Promotions * Percentage off per item * Percentage off all * Fixed amount off per item * Fixed amount off for all * Buy X, get one or more items at a discount * Free gift with purchase * Free shipping * Discounted shipping for an order using a selected ship mode * Discounted shipping for all items using a selected ship mode * Discounted shipping per item using a selected ship mode h1. Open Questions * What persistence store to use? * How to maintain a Crafter Commerce transaction? * What do do with abandoned shopping carts? * Analytics integration? * What user information can we store without having to be PCI compliant?
|