The Store is the heart of the package — it acts as the orchestrator and configuration container for all commerce operations.
- Initialize and configure all submodules (Cart, Orders, Products, Payments, etc.)
- Manage global store settings (currency, tax, region, etc.)
- Provide access to repositories and services
- Define the business rules (e.g., default tax rates, active payment gateways)
- Handle store-level events and lifecycle (e.g., store opened/closed)
- Multi-store support (e.g.,
StoreManager::get('store_id')) - Configurable settings (currency, timezone, locale, etc.)
- Store-specific catalogs, prices, and customers
- Base for dependency injection into all modules
- Product model with ID, name, SKU, price, description, and category
- Support for variants and attributes
- Manage product visibility and stock availability
- Store-aware pricing (each store can have its own price list)
- Search and filter support
- Digital and physical product support
- Each cart belongs to a specific store
- Add, update, and remove items
- Apply taxes, discounts, and coupons dynamically
- Persistent storage (session or database)
- Merge carts (guest → customer)
- Auto-recalculate totals when store configuration (tax, currency) changes
- Create orders from a cart within a specific store
- Store-specific order numbering format
- Track order statuses and fulfillment states
- Support for multiple stores and order partitioning
- Manage billing, shipping, and customer information
- Store-aware tax and discount application
- Store-based pricing rules and discount policies
- Coupon management and validation
- Rule-based discounts (customer group, order value, etc.)
- Multi-currency price lists per store
- Tiered pricing or membership discounts
- Tax configuration per store or region
- Inclusive/exclusive tax display options
- Dynamic calculation based on customer’s address
- Integrate with external tax services (optional)
- Support for compound taxes (VAT + regional tax)
- Each store defines a base currency
- Optional multi-currency conversion using defined exchange rates
- Localized price formatting
- Regional settings (date/time format, language)
- Store-defined shipping zones and methods
- Flat, weight-based, or distance-based pricing
- Integration-ready structure for external APIs (e.g., DHL, UPS)
- Pre-checkout shipping cost estimation
- Store-scoped customers and authentication
- Guest checkout
- Multiple addresses per customer
- Customer group segmentation (VIP, wholesale, etc.)
- Saved orders and carts
- Store-specific payment gateways and credentials
- Unified interface for multiple payment providers
- Transaction logs per store
- Support for offline/manual payments
- Webhook/callback support for async confirmation
- Store-based access controls
- Secure order and checkout validation
- Token-based request verification
- Safe serialization for data exchange
- Protection against cart or price tampering
- Store-level sales summaries
- Top-selling products and categories per store
- Revenue, tax, and discount insights
- Exportable data (CSV/JSON)
- Store-level event dispatching (e.g.,
store.onOrderCreated) - Middleware-like processing pipeline for checkout and payment
- Service provider system for plugin integration
- Configurable dependency container
- Price formatter
- Tax calculator
- Currency converter
- ID and token generator
- Date/time and localization utilities
- README.md with setup and examples
- composer.json with PSR-4 autoload
- Unit tests for all modules
- Configuration file format (e.g.,
config/store.php) - CHANGELOG.md for releases
- LICENSE and CONTRIBUTING.md
- Store API Layer — REST/GraphQL-ready endpoints
- Inventory Synchronization — for multi-warehouse systems
- Subscription Billing — recurring payments per store
- Refunds and Returns — manage credit notes
- Marketplace Support — multiple vendors under one platform
- Admin Dashboard SDK — reusable components for backend UI
| Layer | Purpose |
|---|---|
| Store | Core context, configurations, and orchestrator |
| Product | Catalog and inventory |
| Cart | Manages selected items and totals |
| Order | Finalized transactions and statuses |
| Payment | Gateway and transaction handling |
| Customer | User data and preferences |
| Tax & Currency | Pricing rules and localization |
| Shipping | Delivery logic |
| Analytics | Reporting and insights |
| Extensibility | Events, hooks, and integrations |