Biashara ERP Enterprise Suite
← All guides

E-commerce module

Online storefront builder, catalog sync, and order flow alongside your ERP workspace.

Ecommerce Website Builder Module

Production-grade, multi-tenant online store module integrated with Biashara ERP inventory, POS, CRM, and Kenya payment rails.

Architecture

Layer Location
Config config/ecommerce.php
Models app/Models/Ecommerce/*
Services app/Services/Ecommerce/*
Storefront routes/ecommerce-storefront.php, resources/views/storefront/
Tenant admin routes/ecommerce-admin.php, /ecommerce/*
Platform admin routes/platform.phpplatform/ecommerce
Mobile/API routes/ecommerce-api.php/api/v1/ecommerce/*
Payments Pluggable drivers in app/Services/Ecommerce/Payments/Drivers/

Subscription gating

  • Module key: ecommerce_website
  • Tier presets: enabled on retail_growth, retail_professional, retail_enterprise
  • Middleware: ecommerce.subscription, subscription.module:ecommerce_website
  • Route map: config/subscription_route_modules.php (ecommerce, store prefixes)

Inventory sync

EcommerceInventorySyncService reads BranchInventory (same as POS). Online availability = on-hand minus active cart reservations.

  • Product observer auto-syncs listings when ERP products change
  • Paid orders deduct branch stock; mirrored into sales via PlaceEcommerceSaleService
  • POS sales automatically reflect reduced online availability (shared stock rows)

Payments

Provider Driver Channels
M-Pesa STK MpesaStkPaymentDriver STK Push (reuses Daraja)
M-Pesa manual MpesaManualPaymentDriver Till, Paybill
Stripe StripePaymentDriver Card, Google Pay (intent)
PayPal PayPalPaymentDriver PayPal
Card gateway CardGatewayPaymentDriver Visa, Mastercard

Webhooks: POST /webhooks/ecommerce/mpesa/{organization}ProcessEcommerceWebhookJob

Themes (2026)

Configured in config/ecommerce.php — 13 industry presets (fashion, electronics, pharmacy, etc.).

Super admin

Platform → Ecommerce: global enable, approvals, commission, AI toggle, tenant store list, theme marketplace.

Tenant workflow

  1. Ensure tier includes ecommerce_website
  2. Open /ecommerce → Activate store
  3. Sync products from ERP catalog
  4. Configure payments under /ecommerce/payments
  5. Build pages under /ecommerce/builder
  6. Storefront at {tenant}.domain/store

Supermarket theme pack (supermarket-grid)

Full retail theme with:

  • Promo bar, mega-menu categories, aisle grid, flash countdown, trust badges
  • Theme CSS: resources/css/themes/supermarket-grid.css
  • Views: resources/views/storefront/themes/supermarket-grid/
  • Auto-seeded home sections on activation or when switching theme in store settings

Set Theme → Supermarket Grid under /ecommerce/store, then open /store.

M-Pesa reconciliation

Tenant queue: /ecommerce/payments/reconciliation

  • Query Daraja STK status (DarajaStkQueryService)
  • Manual confirm with receipt code (reuses POS PosManualMpesaVerifier rules)
  • Retry STK (max 3, configurable)
  • Full audit trail in ecommerce_payment_reconciliation_events

Visual builder (drag-and-drop)

/ecommerce/builder — block palette, HTML5 drag reorder, inline inspector, device preview widths.

Block catalog: config/ecommerce_builder.php

Future-ready hooks

  • ecommerce_analytics_events for GA4 / Meta CAPI
  • API routes for Android/iOS apps
  • AI features gated by config/ecommerce.ai
  • GraphQL layer (add routes/graphql.php when needed)

Commands

php artisan migrate
php artisan test --filter=Ecommerce

Ready to run your business on one platform?

14-day trial on entry tier · CRM & mass SMS · Industry-specific modules · Your own workspace subdomain