Integrate YITH WooCommerce Order & Shipment Tracking into the Cirilla app to allows your customers to easily track the shipping of orders placed in e-commerce.
Features
- Show in actions of order item (preview)
- Show in actions of order detail (preview)
- Show in custom widget of App builder (preview)
Requirement
- Plugin YITH WooCommerce Order & Shipment Tracking Premium
v2.23.0
(doc) - Plugin App Builder – YITH WooCommerce Order & Shipment Tracking Premium (image)
- Cirilla
v3.9.0
or above
Install Package
Import package in cirilla/pubspec.yaml
Example:
flutter_yith_track_order:
path: ./packages/flutter_yith_track_order
Then run flutter pub get in your project
Show in actions order item and order detail screen
Use Install button in Register order actions, you should update in cirilla/lib/register_order_actions.dart
.
Import package:
import 'package:flutter_yith_track_order/flutter_yith_track_order.dart';
import 'screens/order/widgets/order_actions_button.dart'; // If the button has not been imported
Add the code snippets to the registerOrderActions function:
if (FlutterYithTrackOrderWidget.checkOpen(data["orderData"]))
ActionButton(
titleText: FlutterYithTrackOrderWidget.title,
widgetContent: FlutterYithTrackOrderWidget(data: data),
),
Show in custom widget in App builder
Use Install widget of Register custom widgets to setting, you should update in cirilla/lib/register_custom_widgets.dart
after setting Custom widget on the App builder with key = yith_track_order
Import package:
import 'package:flutter_yith_track_order/flutter_yith_track_order.dart';
import 'screens/order/widgets/order_actions_button.dart'; // If the button has not been imported
Add the code snippets to the registerCustomWidgets function:
if (key == "yith_track_order") {
return ActionButton(
titleText: FlutterYithTrackOrderWidget.title,
widgetContent: FlutterYithTrackOrderWidget(data: {
"translate": translate,
"baseURL": baseUrl,
}),
);
}