Installation
If you haven't already bought the Uber Direct extension, you can purchase it from the TastyIgniter Marketplace.
After purchasing the extension, add composer.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://composer.tastyigniter.com"
}
},
Next, navigate to Manage > Updates, click the Attach Carté Key button, enter your carte key, and click Attach Carté Key. After the carté key is attached, click the Check Updates button to create your auth.json file. Composer uses that file to authenticate your site with the marketplace so you can install paid extensions.
Install the extension via composer:
composer require igniterlabs/ti-ext-uberdirect -W
Run the database migrations to create the required tables.
php artisan igniter:up
Getting started
The Uber Direct for TastyIgniter extension integrates with Uber Direct API to provide automatic order delivery through Uber's courier network. When a customer places a delivery order, the extension automatically dispatches the order to Uber Direct API when it's ready for pickup.
Configuration
-
Go to System > Settings > Uber Direct Settings to enter your credentials obtained from your Uber Direct Developer Dashboard.
-
Disable the default
deliveryCart Condition and enable theuberdirectdeliveryCart Condition under System > Settings > Cart Settings. -
Enable Reject Orders Outside Delivery Area under System > Settings > Sales. This will require customers to enter their delivery address before placing an order.
-
Configure your webhook URL in the Uber Direct Developer Dashboard to receive real-time status updates:
https://your-site.com/uberdirect/webhook/{token}
How it works
When an order is placed with the Uber Direct delivery option:
- The order is created in your TastyIgniter system as usual.
- When the order status changes to "Ready for Pickup" (configurable in settings), the extension automatically creates a delivery request with Uber Direct API.
- An Uber courier is dispatched to pick up the order from your store.
- The courier delivers the order to the customer's address.
- If the order is canceled, the extension automatically cancels the delivery request with Uber Direct API.
Usage
Settings
Navigate to System > Settings > Uber Direct Settings to configure the extension:
- API Credentials: Enter your Uber Direct API client ID and client secret.
- Environment: Choose between sandbox (testing) or production environment.
- Ready for Pickup Status: Select the order status that triggers the Uber Direct delivery request.
- Delivery Completed Statys: Select the order status that indicates the delivery has been completed.
- Pickup Instructions: Enter any special instructions for the courier when picking up the order.
- Drop-off Instructions: Enter any special instructions for the courier when dropping off the order.
- Location Mappings: Map your store locations to Uber Direct location IDs if you have multiple stores.
Cart Condition
The extension registers a cart condition named uberdirectdelivery that replaces the default delivery cart condition when available. This condition:
- Validates delivery addresses against Uber Direct's service area.
- Calculates delivery fees based on Uber Direct pricing.
- Manages delivery session data.
- Falls back to the default delivery condition if Uber Direct is unavailable or if the delivery address is outside the service area.
To enable it:
- Go to System > Settings > Cart Settings.
- Disable the default
deliverycondition. - Enable the
uberdirectdeliverycondition.
Permissions
The extension registers the following permission:
IgniterLabs.UberDirect.ManageSettings: Control who can access the Uber Direct settings in the admin area.
For more on restricting access to the admin area, see the TastyIgniter Permissions documentation.
use Igniter\User\Facades\AdminAuth;
if (AdminAuth::getUser()->hasPermission('IgniterLabs.UberDirect.ManageSettings')) {
// Do something...
}