pickhero/craft-commerce
最新稳定版本:1.1.5
Composer 安装命令:
composer require pickhero/craft-commerce
包简介
Connect your Craft Commerce store to PickHero WMS for streamlined warehouse management and order fulfillment.
README 文档
README
Connect your Craft Commerce store to PickHero WMS (Warehouse Management System) for streamlined order fulfillment and inventory management.
Features
- Order Synchronization: Automatically submit orders to PickHero when they reach specific statuses
- Order Processing: Trigger stock allocation and picklist generation in PickHero
- Webhook Integration: Receive shipment notifications from PickHero to update order status
- Stock Import: Console command for bulk stock synchronization
Requirements
- Craft CMS 4.0+ or 5.0+
- Craft Commerce 4.0+ or 5.0+
- PHP 8.2+
- A PickHero account with API access
Installation
- Add the plugin to your project's composer requirements
- Run
composer install - Install the plugin via
./craft plugin/install commerce-pickhero
Configuration
API Connection
Configure the plugin in your Craft admin panel under PickHero → Settings, or add a config file at config/commerce-pickhero.php:
<?php return [ 'apiBaseUrl' => getenv('PICKHERO_API_URL'), 'apiToken' => getenv('PICKHERO_API_TOKEN'), ];
Environment Variables
Add these to your .env file:
PICKHERO_API_URL=https://your-instance.pickhero.nl/api
PICKHERO_API_TOKEN=your-bearer-token
Usage
Automatic Order Sync
Configure which order statuses should trigger synchronization:
- Submit on Status Change: Orders are created in PickHero
- Process on Status Change: Orders are processed (stock allocated, picklist created)
Manual Order Actions
Users with the "Manually submit orders to PickHero" permission can:
- Submit orders to PickHero from the order edit screen
- Trigger order processing manually
Product Export (Craft → PickHero)
Export your Craft Commerce products to PickHero:
./craft commerce-pickhero/export-products
Options:
--limit=N: Process maximum N products--offset=N: Skip first N products--only-new: Only create products that don't exist in PickHero--update: Update existing products in PickHero--dry-run: Show what would be done without making changes--debug: Stop on first error
Examples:
# Export all products (create only, skip existing) ./craft commerce-pickhero/export-products # Export and update existing products ./craft commerce-pickhero/export-products --update # Only export new products ./craft commerce-pickhero/export-products --only-new # Dry run to see what would happen ./craft commerce-pickhero/export-products --dry-run
Stock Import (PickHero → Craft)
Import stock levels from PickHero to update your Craft Commerce inventory:
./craft commerce-pickhero/import-product-stock
Options:
--limit=N: Process maximum N products--offset=N: Skip first N products--debug: Stop on first error
Webhook Setup
- Enable "Sync Order Status" in the plugin settings
- Click "Register" next to the webhook status
- Configure status mapping to update Craft order status when shipments are created
Events
Modify Order Line Items
Customize which line items are sent to PickHero:
use pickhero\commerce\services\PickHeroApi; use pickhero\commerce\events\OrderLineItemsEvent; use yii\base\Event; Event::on( PickHeroApi::class, PickHeroApi::EVENT_MODIFY_ORDER_LINE_ITEMS, function(OrderLineItemsEvent $event) { // Filter or modify line items $event->lineItems = array_filter($event->lineItems, function($item) { return $item->getSku() !== 'SKIP-THIS'; }); } );
Documentation
For full documentation, visit pickhero.nl/docs/craft-commerce.
Support
For support, please contact PickHero.
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2025-12-22