Skip to main content
Suppliers represent external vendors or manufacturers who provide products for your store. This is primarily used in dropshipping scenarios where products are shipped directly from the supplier to the customer, without you handling inventory.
The supplier feature is gated behind a feature flag. It must be enabled in your config/shopper/features.php configuration file.

Model

The model used is Shopper\Core\Models\Supplier. It implements Shopper\Core\Models\Contracts\Supplier and uses the HasSlug trait for automatic slug generation. The model is configurable via config/shopper/models.php.

Extending the Model

To add custom behavior, extend the model and update your configuration:
Update config/shopper/models.php:

Feature Flag

Enable the supplier feature in config/shopper/features.php:
When enabled, the Suppliers page appears under Products in the admin sidebar, and the supplier select field becomes visible on External product forms.

Database Schema

Relationships

Products

A supplier can have many products linked to it:

Product → Supplier

Each product can optionally belong to one supplier:

Query Scopes

Creating Suppliers

Updating Status

Retrieving Suppliers

Linking Products to Suppliers

Products of type External can be linked to a supplier. The supplier_id column on the products table stores this relationship:

Dropshipping Workflow

The supplier feature is designed to work with the Fulfillment system. Here’s the complete flow:

1. Setup

2. Customer Places Order

When a customer orders a product linked to a supplier, the order is created normally. The item’s fulfillment_status starts as Pending.

3. Forward to Supplier

After receiving the customer’s payment, you place the order with your supplier using the customer’s shipping address:

4. Supplier Ships

When the supplier provides tracking information:

5. Delivery Confirmation

Querying by Supplier

Permissions

The supplier feature uses the following permissions:

Components

The supplier feature registers its components through the product configuration. Publish the product components to customize:
This includes:

Metadata

The metadata column (JSON) can store any additional supplier-specific data: