Add catalog sync trigger, metrics, and shipping label actions to integrations.
Deploy Ladill Woo Manager / deploy (push) Successful in 1m5s

Surfaces actionable controls in Ladill instead of status-only cards: sync catalogs via the plugin proxy, show channel metrics, and link to orders/labels for fulfillment.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-08 11:28:42 +00:00
co-authored by Cursor
parent 1e97f129e9
commit 644c3d9cde
7 changed files with 305 additions and 2 deletions
@@ -29,6 +29,18 @@
@endif
</div>
@if(session('success'))
<div class="rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm text-emerald-800">
{{ session('success') }}
</div>
@endif
@if(session('error'))
<div class="rounded-xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-800">
{{ session('error') }}
</div>
@endif
@if(! $store)
<div class="rounded-2xl border border-dashed border-slate-200 bg-white px-6 py-10 text-center">
<p class="text-sm text-slate-600">No active store selected.</p>
@@ -48,6 +60,7 @@
@foreach($integrations as $integration)
@php
$state = $integration['state'];
$metrics = $integration['metrics'] ?? [];
$badge = match ($state) {
'connected' => ['Connected', 'bg-emerald-50 text-emerald-700 ring-emerald-200'],
'available', 'needs_setup' => $integration['installed']
@@ -73,6 +86,47 @@
<p class="mt-3 text-sm text-slate-500">{{ $integration['summary'] }}</p>
@endif
@if(! empty($metrics['available']))
<dl class="mt-4 grid grid-cols-2 gap-3 rounded-xl bg-slate-50 p-3 text-xs">
@if(isset($metrics['published_products']))
<div>
<dt class="font-medium text-slate-500">Published products</dt>
<dd class="mt-0.5 text-sm font-semibold text-slate-900">{{ number_format((int) $metrics['published_products']) }}</dd>
</div>
@endif
@if(isset($metrics['synced_products']))
<div>
<dt class="font-medium text-slate-500">Synced to channel</dt>
<dd class="mt-0.5 text-sm font-semibold text-slate-900">{{ number_format((int) $metrics['synced_products']) }}</dd>
</div>
@endif
@if(isset($metrics['pending_products']))
<div>
<dt class="font-medium text-slate-500">Pending sync</dt>
<dd class="mt-0.5 text-sm font-semibold text-slate-900">{{ number_format((int) $metrics['pending_products']) }}</dd>
</div>
@endif
@if(isset($metrics['orders_awaiting_fulfillment']))
<div>
<dt class="font-medium text-slate-500">Awaiting fulfillment</dt>
<dd class="mt-0.5 text-sm font-semibold text-slate-900">{{ number_format((int) $metrics['orders_awaiting_fulfillment']) }}</dd>
</div>
@endif
@if(isset($metrics['labeled_orders']))
<div>
<dt class="font-medium text-slate-500">Labeled orders</dt>
<dd class="mt-0.5 text-sm font-semibold text-slate-900">{{ number_format((int) $metrics['labeled_orders']) }}</dd>
</div>
@endif
@if(! empty($metrics['catalog_sync_status']) && $metrics['catalog_sync_status'] !== 'unknown')
<div class="col-span-2">
<dt class="font-medium text-slate-500">Catalog sync</dt>
<dd class="mt-0.5 text-sm font-semibold capitalize text-slate-900">{{ str_replace('_', ' ', $metrics['catalog_sync_status']) }}</dd>
</div>
@endif
</dl>
@endif
@if($integration['key'] === 'shipping' && ! empty($integration['details']['woocommerce_shipping']))
<p class="mt-2 text-xs text-slate-500">
WooCommerce Shipping
@@ -85,6 +139,30 @@
@endif
<div class="mt-5 flex flex-wrap items-center gap-2">
@if($integration['supports_catalog_sync'] && $integration['connected'] && $reachable)
<form method="post" action="{{ route('woo.integrations.sync', $integration['key']) }}">
@csrf
<button type="submit"
class="inline-flex items-center rounded-xl bg-slate-900 px-4 py-2 text-sm font-semibold text-white hover:bg-slate-800">
Sync catalog
</button>
</form>
@endif
@if($integration['supports_label_actions'] && $store)
<a href="{{ route('woo.orders.index') }}"
class="inline-flex items-center rounded-xl border border-slate-200 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
View orders
</a>
@endif
@if($integration['key'] === 'shipping' && ! empty($integration['details']['labels_manage_url']))
<a href="{{ $integration['details']['labels_manage_url'] }}" target="_blank" rel="noopener noreferrer"
class="inline-flex items-center rounded-xl border border-slate-200 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
Manage labels
</a>
@endif
@if($integration['manage_url'])
<a href="{{ $integration['manage_url'] }}" target="_blank" rel="noopener noreferrer"
class="inline-flex items-center rounded-xl bg-indigo-600 px-4 py-2 text-sm font-semibold text-white hover:bg-indigo-700">
@@ -109,7 +187,7 @@
</div>
<div class="rounded-2xl border border-slate-200 bg-slate-50 px-5 py-4 text-sm text-slate-600">
Ladill surfaces official WooCommerce extensions installed on your store. OAuth, catalog sync, and ad setup still happen in WordPress open <strong>Manage in WordPress</strong> to finish configuration.
Ladill surfaces official WooCommerce extensions on your store. Use <strong>Sync catalog</strong> to trigger a product feed sync from Ladill, or open <strong>Manage in WordPress</strong> for OAuth, ads, and advanced setup.
</div>
</div>
</x-user-layout>