feat(orders): embed My Orders inside user center (zibll-style)
Register UC panel tab=orders with full order list/actions UI; route aksrt_get_orders_page_url and /orders template to profile?tab=orders; enqueue order assets when the UC orders tab is active.
This commit is contained in:
1 parent
dae85f0198
commit
354a1072ef
8 files changed
+598
-464
No files matched your search
@@ -52,8 +52,14 @@ if (empty($orders_url) && empty($show_vip) && empty($show_credit_tabs) && empty(
|
||||
<div class="uc-sidebar__title"><?php esc_html_e('权益与消费', 'aksrt'); ?></div>
|
||||
<div class="uc-sidebar__buttons">
|
||||
<?php $revenue_url = function_exists('aksrt_get_revenue_page_url') ? aksrt_get_revenue_page_url() : ''; ?>
|
||||
<?php if (!empty($orders_url)) : ?>
|
||||
<a href="<?php echo esc_url($orders_url); ?>" class="uc-sidebar__btn">
|
||||
<?php
|
||||
$orders_href = !empty($orders_url)
|
||||
? (string) $orders_url
|
||||
: (function_exists('aksrt_get_user_center_tab_url') ? aksrt_get_user_center_tab_url('orders') : '');
|
||||
if ($orders_href !== '') :
|
||||
$orders_active = !empty($active_tab) && $active_tab === 'orders';
|
||||
?>
|
||||
<a href="<?php echo esc_url($orders_href); ?>" class="uc-sidebar__btn<?php echo $orders_active ? ' is-active' : ''; ?>" data-tab="orders">
|
||||
<i class="fas fa-receipt" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e('我的订单', 'aksrt'); ?></span>
|
||||
</a>
|
||||
|
||||
Reference in new issue
Block a user