Installation
If you haven't already bought the TastyIgniter Multi Vendor extension, you can purchase it from the TastyIgniter Marketplace.
After purchasing the extension, add satis.tastyigniter.com
as a repository in your composer.json
file to allow Composer to find the package. This is done automatically when you install the extension via the TastyIgniter Admin.
"repositories": {
"tastyigniter": {
"type": "composer",
"url": "https://satis.tastyigniter.com"
}
},
Next, create a auth.json
file under the same directory as your composer.json
file to provide your TastyIgniter Marketplace credentials. This file should contain your email address and carte key in the following format:
{
"http-basic": {
"satis.tastyigniter.com": {
"username": "your-tastyigniter-account-email-address",
"password": "your-tastyigniter-site-carte-key"
}
}
}
- username: Your TastyIgniter account email address.
- password: Your TastyIgniter site carte key, which you can find in your TastyIgniter account under Sites.
After setting up the auth.json
file, you'll be able to install the extension via composer using the following command:
composer require igniterlabs/ti-ext-multivendor -W
Run the database migrations to create the required tables:
php artisan igniter:up
Getting started
To get started with the Multi Vendor extension, follow these steps:
Configuring Multi Vendor Settings
From your TastyIgniter Admin, configure the Multi Vendor settings by navigating to the Manage > Settings > Multi Vendor Settings admin page. You can set up the following configurations:
- Enable vendor registration.
- Allow vendors to configure their own payment preferences.
- Set user roles for vendor owners and admins.
- Choose how commissions are paid.
- Limit the number of resources (such as menu items or locations) a vendor can create.
Configuring Vendor Roles
You can set up permissions for vendors to control what they have access to on your platform.
-
Navigate to Manager > Staff members > Roles and create the following roles if they do not already exist:
- Multi Vendor Owners: This role will have full control over their own resources.
- Multi Vendor Admins: This role will have limited control, allowing them to manage resources but not change settings.
-
Assign permissions to these roles to allow vendors to manage their own resources, such as menu items, locations, and orders.
Creating Vendors
To create vendors and set up their accounts, follow these steps:
- Navigate to Manage > Vendors and click on the New button.
- Fill in the vendor details, including the vendor name, email, and any other required information.
- A location and user account will be created for the vendor automatically.
- After creating the vendor, you can assign additional existing locations or users to the vendor if needed.
- You can also set the vendor's commission rates by assigning a commission rule to the vendor. This will determine how much commission you take from their sales.
Creating cuisines
To create cuisines for your vendors, follow these steps:
- Navigate to Restaurant > Menu Items > Cuisines and click on the New button.
- Fill in the cuisine details, including the name and description.
- You can also assign the cuisine to specific vendor locations by selecting the location from the Location(s) dropdown.
- After creating the cuisine, it will be available for vendors to select when creating or managing their locations.
- Vendors can also create their own cuisines if they have the necessary permissions.
- To allow vendors to create their own cuisines, ensure that the IgniterLabs.MultiVendor.Cuisines permission is enabled for the Multi Vendor Owners and Multi Vendor Admins roles.
Creating a commission rule
With commission rules, you can manage how much commission you take from vendor sales. This allows you to set up different commission rates for different vendors or types of orders.
- Navigate to Manage > Vendors > Commission Rules and click on the New button.
- The following fields are available on the New Commission Rule page:
- Name: Enter a name for the commission rule to identify it.
- Priority: Set the priority of the commission rule. This is used to determine the order in which commission rules are applied when multiple rules are assigned to a vendor.
-
Fee Type: Choose the type of fee for the commission rule. You can select from:
- Percentage: A percentage of the order total will be charged as commission.
- Fixed: A fixed amount will be charged as commission.
- Fee Amount: Enter the amount for the commission fee. If you selected Percentage, enter the percentage value (e.g., 10 for 10%). If you selected Fixed, enter the fixed amount (e.g., 5 for $5).
-
Conditions: You can set conditions to apply the commission rule only to specific orders. The following fields are available:
-
Attribute:: Select the order attribute to apply the condition to. You can choose from:
- Cart Total: Apply the commission rule based only if the order total is above, below or equal a certain amount.
- Cart total items: Apply the commission rule only if the number of order items is above, below or equal a certain quantity.
- Order Type: Apply the commission rule based on the type of order (e.g., delivery, pickup, dine-in).
- Payment Method: Apply the commission rule based on the payment method used for the order.
-
Operator: Select the operator for the condition. You can choose from:
- Contains: The order attribute must contain the specified value.
- Does Not Contain: The order attribute must not contain the specified value.
- Equal or Greater than: The order attribute must be equal to or greater than the specified value.
- Equal or Less than: The order attribute must be equal to or less than the specified value.
- Greater than: The order attribute must be greater than the specified value.
- Less than: The order attribute must be less than the specified value.
- Is: The order attribute must be equal to the specified value.
- Is not: The order attribute must not be equal to the specified value.
- Value: Enter the value for the condition. This will depend on the selected attribute and operator.
-
Attribute:: Select the order attribute to apply the condition to. You can choose from:
-
Commission Totals: You can choose how the cart total is calculated for the commission. The options are:
-
Total: Select the cart total to include or exclude from the commission calculation. You can choose to include or exclude:
- Subtotal: The subtotal of the order.
- Delivery Fee: The delivery fee charged for the order.
- Tax: The tax amount applied to the order.
- Coupon Discount: The discount applied through a coupon code.
-
Action: Choose whether to include or exclude the selected total. You can select from:
- Credit to Vendor: The selected total will be excluded from the commission calculation, meaning the vendor will receive the full amount.
- Credit to Admin: The selected total will be added to the commission amount, meaning the admin will receive the commission amount plus the selected total amount.
-
Total: Select the cart total to include or exclude from the commission calculation. You can choose to include or exclude:
Assigning commission rules to vendors
To assign commission rules to vendors, follow these steps:
- Navigate to Manage > Vendors and select the vendor you want to assign commission rules to.
- Under the Commission Rule(s) field, select the commission rule you created earlier. This will apply the commission rates to the vendor's orders.
- You can assign multiple commission rules to a vendor, and they will be applied based on the priority you set in the commission rule.
- After assigning the commission rule, click the Save button to save your changes.
Viewing commissions
You can view the commissions collected from vendors by navigating to the Manage > Vendors > Commissions page. Here you can see:
- The total amount of commission collected from each vendor.
- The date and time when the commission was collected.
- The status of the commission (e.g., pending, paid).
Enabling vendor registration
To enable vendor registration, follow these steps:
- Navigate to Manage > Settings > Multi Vendor Settings.
- Under the General tab, find the Enable Vendor Registration option and set it to Yes.
- This will allow users to register as vendors on your platform.
- Click the Save button to save your changes.
- After enabling vendor registration, you will need to create a vendor registration page to allow users to register as vendors.
Creating the vendor sign up page
If you've enabled vendor registration and you want to allow users to register as vendors, you can create a vendor sign-up page. Follow these steps to create the page:
- Navigate to the Theme Template Editor under Design > Themes then click the file icon next to your active theme
- In the Template section, select Pages and then click on the New Page button.
- In the New Page dialog, enter
vendor-register
as the Template filename and click Save. - From the Choose a component to attach dropdown, select Vendor Register to attach the component to the page.
- Once attached, under the Meta tab, set the following fields:
- Title: Register as a Vendor
- Permalink: /vendor/register
- Layout: Default layout
- Description: Register as a vendor to start selling on our platform.
- In the Markup tab, add the following code:
<div class="container">
<div class="row py-4">
<div class="col-sm-8 mx-auto">
<livewire:igniterlabs.multivendor::register/>
</div>
</div>
</div>
-
This code will render the vendor registration form on the page.
-
You can also customize the page further by adding additional content or styling as needed.
-
Click the Save button to save your changes.
-
After saving, you can access the vendor registration page at
/vendor/register
.
Enabling brand colors for vendors
To enable brand colors for vendors, follow these steps:
- Navigate to Manage > Staff members > Roles > MultiVendor Owners > Permissions.
- Allow the IgniterLabs.MultiVendor.BrandColors permission.
- After enabling the permission, vendors can set their brand colors by logging in to the Admin Panel and navigating to Design > Brand Colors.
- From the Brand Colors page, vendors can set their restaurant brand colors and click Save to apply the changes.
- The brand colors will be used in menus and reservations storefront pages.