Skip to content

Commerce

melis-commerce adds a full e-commerce domain to Melis: catalog, customers, cart, checkout and orders — exposed both as backoffice tools and front-office plugins. This page is a map to get oriented; read the module's src/Service/ for the exact, current API.

Domain model

The main concepts (entities under melis-commerce/src/Entity/, tables prefixed melis_ecom_*):

AreaConceptsTables (examples)
CatalogProduct, Variant (sellable SKU), Category, Attribute & valuesmelis_ecom_product, melis_ecom_variant, melis_ecom_category, melis_ecom_attribute
PricingPrice by variant/product × country × currency × client groupmelis_ecom_price, melis_ecom_client_groups
CustomersClient (account), Client person, addressesmelis_ecom_client, melis_ecom_client_person
CartAnonymous & persistent basketsmelis_ecom_basket_anonymous, melis_ecom_basket_persistent
OrdersOrder + addresses, payment, shipping; returnsmelis_ecom_order, melis_ecom_order_address, melis_ecom_order_payment
PromotionsCoupons (product/client restricted)melis_ecom_coupon, melis_ecom_coupon_product
LocalizationCountry, Currencymelis_ecom_country, melis_ecom_currency
MediaDocuments (images/PDF)melis_ecom_document

Services you'll use

All registered in melis-commerce/config/module.config.php (service_manager.aliases). The main ones:

  • Catalog: MelisComProductService, MelisComVariantService, MelisComCategoryService, MelisComAttributeService, MelisComPriceService, MelisComProductSearchService, MelisComDocumentService.
  • Cart & checkout: MelisComBasketService, MelisComOrderCheckoutService, MelisComOrderService, MelisComShipmentCostService, MelisComPostPaymentService, MelisComOrderProductReturnService.
  • Customers: MelisComClientService, MelisComAuthenticationService, MelisComContactService, MelisComClientGroupsService.
  • Config: MelisComCouponService, MelisComCurrencyService, MelisComSeoService.
php
$products = $sm->get('MelisComProductService');
$orders   = $sm->get('MelisComOrderService');

Each service sits on a MelisEcom*Table data layer (e.g. MelisEcomProductTablemelis_ecom_product).

In the backoffice

MelisCommerce registers a Commerce toolset with tools for: products & variants, categories, attributes, orders, clients, coupons, currencies/countries, documents and settings — built like any other backoffice tool.

On the front office

Commerce ships a large set of templating plugins (drop them into pages — see Plugins) covering the whole storefront:

  • Catalog: MelisCommerceProductShowPlugin, MelisCommerceProductListPlugin, MelisCommerceProductSearchPlugin, MelisCommerceCategoryProductListPlugin, MelisCommerceRelatedProductsPlugin.
  • Account: MelisCommerceLoginPlugin, MelisCommerceRegisterPlugin, MelisCommerceAccountPlugin, MelisCommerceProfilePlugin, delivery/billing address plugins.
  • Cart & checkout: MelisCommerceAddToCartPlugin, MelisCommerceCartPlugin, MelisCommerceCheckoutPlugin (+ cart / coupon / addresses / summary / confirm steps).
  • Orders: MelisCommerceOrderHistoryPlugin, MelisCommerceOrderPlugin, MelisCommerceOrderReturnProductPlugin.

…plus dashboard widgets (orders count, sales revenue, order messages).

A storefront is therefore assembled mostly by placing these plugins on CMS pages and styling them in your site module's views.

Invoicing

melis-commerce-order-invoice extends commerce with PDF invoice generation (via Spipu/Html2Pdf): an invoice service + table (melis_ecom_order_invoice), backoffice download, and listeners that inject invoice UI into the order views.

Key files

ConcernPath
Servicesvendor/melisplatform/melis-commerce/src/Service/
Entitiesvendor/melisplatform/melis-commerce/src/Entity/
Schemavendor/melisplatform/melis-commerce/install/sql/setup_structure.sql
Front pluginsvendor/melisplatform/melis-commerce/src/Controller/Plugin/
Invoicingvendor/melisplatform/melis-commerce-order-invoice/