ShopBite Plugin Configuration
After installing the ShopBite Plugin, you need to configure it to activate the gastronomy-specific functions and adapt them to your requirements.
Basic Configuration
1. Activate Plugin
- Open Shopware Administration
- Navigate to Extensions > My Extensions
- Find ShopBite Plugin
- Click Activate
2. Basic Settings
Navigate to ShopBite > Settings in the administration:
General Settings
- Activate Plugin: Main switch for all ShopBite functions
- Enable API Access: Allows the storefront to access ShopBite APIs
- Debug Mode: Enables detailed logging (for development only)
- Sales Channel Selection: Select the sales channels for which ShopBite should be active
Storefront Settings
- Storefront URL: The URL of your ShopBite Storefront (e.g.,
https://Your-Storefront.de) - API Access Key: The key for storefront API communication
- CORS Origin: The allowed domains for CORS (e.g.,
https://Your-Storefront.de) - API Timeout: Maximum wait time for API requests (default: 30 seconds)
Business Hours Management
1. Set Up Business Hours
- Navigate to ShopBite > Business Hours
- Click Add New Business Hours
- Configure the following fields:
Business Hours Fields
| Field | Description | Example |
|---|---|---|
| Sales Channel | Select sales channel | "My Restaurant" |
| Day of Week | Day of the week (0=Sunday, 1=Monday, etc.) | 1 (Monday) |
| Opening Time | Opening time in HH:MM format | 11:00 |
| Closing Time | Closing time in HH:MM format | 22:00 |
| Closed | Mark day as closed | ✓ |
Example Configuration
Monday: 11:00 - 22:00
Tuesday: 11:00 - 22:00
Wednesday: Closed
Thursday: 11:00 - 23:00
Friday: 11:00 - 00:00
Saturday: 12:00 - 00:00
Sunday: 12:00 - 22:00
2. Special Opening Hours
For special occasions or seasonal changes:
- Navigate to ShopBite > Business Hours > Special Opening Hours
- Click Add New Special Opening Hours
- Configure the following fields:
Special Opening Hours Fields
| Field | Description | Example |
|---|---|---|
| Sales Channel | Select sales channel | "My Restaurant" |
| Date | Date of special opening | 24.12.2024 |
| Opening Time | Special opening time | 10:00 |
| Closing Time | Special closing time | 14:00 |
| Description | Optional description | "Christmas Eve - shortened hours" |
3. API Query
Business hours can be retrieved via the Store API:
# API Endpoint
GET /store-api/shopbite/business-hour
# Example Response
{
"data": [
{
"dayOfWeek": 1,
"openingTime": "11:00",
"closingTime": "22:00",
"salesChannelId": "019a36f224b0704fb6835914050392f4"
},
{
"dayOfWeek": 2,
"openingTime": "11:00",
"closingTime": "22:00",
"salesChannelId": "019a36f224b0704fb6835914050392f4"
}
]
}
Holiday Management
1. Set Up Holidays
- Navigate to ShopBite > Holidays
- Click Add New Holiday
- Configure the following fields:
Holiday Fields
| Field | Description | Example |
|---|---|---|
| Name | Name of the holiday | "Christmas" |
| Start Date | Beginning of closure | 24.12.2024 18:00 |
| End Date | End of closure | 26.12.2024 23:59 |
| Sales Channel | Select sales channel | "My Restaurant" |
| Recur Annually | Repeat holiday annually | ✓ |
| Description | Optional description | "Christmas holidays" |
Example Holidays
New Year's Day: 01.01.2024 00:00 - 01.01.2024 23:59
Good Friday: 29.03.2024 00:00 - 29.03.2024 23:59
Easter Monday: 01.04.2024 00:00 - 01.04.2024 23:59
Labor Day: 01.05.2024 00:00 - 01.05.2024 23:59
Christmas: 24.12.2024 18:00 - 26.12.2024 23:59
2. Recurring Holidays
For annually recurring holidays:
- Enable Recur Annually
- Select Month and Day
- Enter Name (e.g., "Christmas")
- Define Period (e.g., 24.12. - 26.12.)
3. API Query
Holidays can be retrieved via the Store API:
# API Endpoint
GET /store-api/shopbite/holiday
# Example Response
{
"data": [
{
"id": "019a36f224b0704fb6835914050392f4",
"start": "2024-12-24T18:00:00+01:00",
"end": "2024-12-26T23:59:00+01:00",
"salesChannelId": "019a36f224b0704fb6835914050392f4",
"name": "Christmas",
"description": "Christmas holidays"
}
]
}
Checkout Extensions
1. Order Types
ShopBite supports different order types:
- Pickup: Customers pick up the order themselves
- Delivery: Order is delivered
- On Site: Order for immediate consumption on site
Configure the available order types under ShopBite > Checkout > Order Types
2. Time Windows for Orders
Set how far in advance orders can be placed:
- Minimum Lead Time: 15 minutes (default)
- Maximum Lead Time: 7 days (default)
- Time Window Interval: 15 minutes (default)
3. Receipt Print Types
The plugin supports different receipt print types for products:
- Configure Custom Fields:
- Navigate to Settings > Custom Fields
- Select ShopBite Product Set
- Configure Receipt Print Type for products
- Print Types:
- Standard: Normal receipt print
- Kitchen: Kitchen receipt for preparation
- Bar: Bar receipt for drinks
- No Print: No receipt print required
4. Delivery Time Factors
Configure delivery time factors for products:
- Standard Delivery Time: 30 minutes (configurable)
- Product-Specific Factors: Multiplier for standard time
- Example: Pizza (factor 2) = 60 minutes delivery time
API Configuration
1. Set Up API Access
- Navigate to Settings > System > Integrations
- Click Add Integration
- Configure the following settings:
API Integration Settings
| Field | Value | Description |
|---|---|---|
| Name | ShopBite Storefront | Name of the integration |
| Description | API access for ShopBite | Description |
| Permissions | order:read, order:write, product:read | Required API permissions |
| Access Type | Admin Integration | Full API access |
2. Set Up Webhooks
For real-time updates:
- Navigate to Settings > System > Webhooks
- Click Add Webhook
- Configure the following webhooks:
Recommended Webhooks
| Event | URL | Description |
|---|---|---|
order.state.changed | https://Your-Storefront.de/api/webhooks/order-status | Order status changes |
order.created | https://Your-Storefront.de/api/webhooks/order-created | New orders |
product.changed | https://Your-Storefront.de/api/webhooks/product-changed | Product changes |
3. CORS Configuration
Configure CORS for the storefront:
# In .env or configuration
SHOPWARE_CORS_ALLOW_ORIGIN="https://Your-Storefront.de"
SHOPWARE_CORS_ALLOW_METHODS="GET, POST, PUT, DELETE, OPTIONS"
SHOPWARE_CORS_ALLOW_HEADERS="Authorization, Content-Type, sw-access-key"
Advanced Settings
1. Performance Optimization
- Cache TTL: 3600 seconds (default)
- API Rate Limiting: 100 requests per minute (default)
- Database Index Optimization: Enabled (recommended)
2. Logging
- Log Level: Info (default), Debug (for development)
- Log Rotation: Daily (default)
- Maximum Log Size: 100MB (default)
3. Database Optimization
-- Indexes for ShopBite tables
ALTER TABLE `shopbite_business_hour` ADD INDEX `idx_sales_channel` (`sales_channel_id`);
ALTER TABLE `shopbite_holiday` ADD INDEX `idx_sales_channel` (`sales_channel_id`);
-- Optimization for frequent queries
ALTER TABLE `shopbite_business_hour` ADD INDEX `idx_day_of_week` (`day_of_week`);
ALTER TABLE `shopbite_holiday` ADD INDEX `idx_date_range` (`start`, `end`);
Troubleshooting
Common Issues
Problem: API Connection Failed
Symptoms:
- "Connection refused" error
- API endpoints not reachable
Solutions:
# Check API credentials
bin/console integration:list
# Check CORS settings
bin/console config:get Shopware.Core.SystemConfig.corsAllowOrigin
# Check firewall settings
sudo ufw status
Problem: Business Hours Not Displayed
Symptoms:
- API returns empty results
- Business hours not visible
Solutions:
# Clear cache
bin/console cache:clear
# Check database
mysql -u shopware -p shopware -e "SELECT * FROM shopbite_business_hour;"
# Check Sales Channel ID
bin/console sales-channel:list
Problem: Holidays Not Considered
Symptoms:
- Orders possible on holidays
- Holidays not visible in API
Solutions:
# Check holiday data
mysql -u shopware -p shopware -e "SELECT * FROM shopbite_holiday;"
# Check time format
bin/console database:check-timezone
# Test API query
curl -X GET "https://Your-Domain.de/store-api/shopbite/holiday" -H "Authorization: Bearer YourToken"
Problem: Checkout Extensions Not Working
Symptoms:
- Receipt print types ignored
- Delivery time calculation incorrect
Solutions:
# Check custom fields
bin/console custom-field:set:list
# Clear plugin cache
bin/console plugin:refresh ShopBite
# Check checkout processor
bin/console debug:container --tag=shopware.checkout.cart.processor
Next Steps
- Business Hours Management - Detailed business hours configuration
- Holiday Management - Advanced holiday management
- Administration Interface - Operation of the plugin interface
- API Reference - Technical API documentation