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 isShopper\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:config/shopper/models.php:
Feature Flag
Enable the supplier feature inconfig/shopper/features.php:
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 typeExternal 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’sfulfillment_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:Metadata
Themetadata column (JSON) can store any additional supplier-specific data: