feat(shop): complete storefront archive, seller edit, revenue

Wire product cat/tag archives to settings-driven sort and AJAX paging,
seller product options/video/params editing, revenue withdraw form and
order review submit — finishing remaining shop frontend gaps after buy-path.
This commit is contained in:
kate522 committed 2026-07-12 10:38:02 +08:00
1 parent 5a8f08db8a
commit f3db6c89cc
17 files changed
+1024 -248

No files matched your search

+10 -7
View File
@@ -82,12 +82,13 @@ function aksrt_get_revenue_page_view(int $user_id): array {
if (class_exists('AKSRT_Revenue')) {
$revenues = AKSRT_Revenue::get_instance()->get_user_revenues($user_id, ['limit' => 200]);
foreach ($revenues as $rev) {
$total_earned += (float) ($rev->amount ?? 0);
$row = is_array($rev) ? $rev : (array) $rev;
$total_earned += (float) ($row['amount'] ?? 0);
$records[] = [
'type' => 'earning',
'title' => (string) ($rev->description ?? __('创作分成', 'aksrt')),
'amount' => (float) ($rev->amount ?? 0),
'created_at' => (string) ($rev->created_at ?? ''),
'title' => (string) ($row['description'] ?? $row['type'] ?? __('创作分成', 'aksrt')),
'amount' => (float) ($row['amount'] ?? 0),
'created_at' => (string) ($row['created_at'] ?? ''),
];
}
}
@@ -95,12 +96,14 @@ function aksrt_get_revenue_page_view(int $user_id): array {
if (class_exists('AKSRT_Withdrawal')) {
$withdrawals = AKSRT_Withdrawal::get_instance()->get_user_withdrawals($user_id, ['limit' => 200]);
foreach ($withdrawals as $w) {
$total_withdrawn += (float) ($w->amount ?? 0);
$wrow = is_array($w) ? $w : (array) $w;
$total_withdrawn += (float) ($wrow['amount'] ?? 0);
$records[] = [
'type' => 'withdrawal',
'title' => __('提现', 'aksrt'),
'amount' => (float) ($w->amount ?? 0),
'created_at' => (string) ($w->created_at ?? ''),
'amount' => (float) ($wrow['amount'] ?? 0),
'created_at' => (string) ($wrow['created_at'] ?? ''),
'status' => (string) ($wrow['status'] ?? ''),
];
}
}