Skip to main content
Lunar 2.0 is now in beta. Since the first alpha, the core has gained the remaining checkout features planned for 2.0, the admin panel has matured, and the database schema has settled. From here, the focus moves from new features to stability and feedback ahead of 2.0.0.
This is a beta. The API is close to final, but breaking changes are still possible before 2.0.0. Test thoroughly against a copy of a store before using it in production, and always work from a database backup.

What’s new

Checkout and orders

  • Fulfilment choice and pickup locations: customers choose shipping or pickup for each cart line, and pickup lines are collected from a location that accepts pickup. See Fulfilment choice.
  • Payment terms: a payment type can place an order on terms, such as on account, instead of taking payment at checkout. See Payment terms.
  • Customer notifications: Lunar sends default emails across the order lifecycle, with templates and copy that a store can customize or replace. See Notifications.
  • Persisted cart totals: a calculated cart stores its totals, so later reads serve them without running the calculation again until the cart changes. See Persisted totals.
  • Remembered guest carts: a long-lived cookie restores a guest’s cart after their session expires. See Remembering guest carts.
  • Calculation steps in code: the steps that price carts, create orders and validate carts are registered from a service provider through the Steps facade instead of config. See Registering calculation steps.

Discounts

  • Coupon batches: a discount can have many codes, generated in batches for campaigns such as single-use codes. See Generating codes and the single-use coupon campaign guide.
  • Per-customer limits for guests: per-customer usage limits now apply to guest checkout as well, matching customers by email. Usage is counted when the order is placed. See Per-customer limits.
  • Reward lines follow the reward: lines that a Buy X Get Y discount adds to a cart are adjusted or removed when the cart no longer earns them.

Inventory

  • Selling flags: continue_selling and sell_against_incoming on each variant replace the selling policy and its backorder allowance. See Sellability.
  • Incoming stock: the stock a location expects to receive can be set by hand, and the panel edits it inline. See Setting incoming stock.
Search requests and results now run through configurable pipelines, so a store can add its own stages and pass engine-specific parameters. Product codes match whether or not a customer types their hyphens. See Pipelines and Product code search.

Admin panel

  • Products edit through drafts: product edits autosave as a draft with field-level conflict detection, like the other first-party edit pages. See Edit Drafts.
  • Form slices: add-ons can add their own fields to first-party create, edit and settings forms. See Form Slices.
  • Table-rate shipping: shipping zones, methods and exclusion lists are managed in the Inertia panel under Settings > Shipping. See Table Rate Shipping.
  • Attribute descriptions: attributes can carry helper text that staff see under the field on every edit page. See Descriptions.

A stable schema

During the alphas, schema changes were folded into the 2.0 baseline migrations. From 2.0.0-beta.1, the baseline migrations no longer change: every schema change ships as a new migration that php artisan migrate runs. An application installed on an alpha needs one catch-up migration to reach the beta schema. The alpha upgrade guide lists every change by release.

Installing

Until 2.0.0 is released, require each lunarphp/* package with the ^2.0@beta constraint:
See the installation guide for the full steps, and the upgrade guide to move a 1.x store.

Feedback

Beta feedback is welcome through GitHub Discussions or the Discord community. View the full release on GitHub.