From 713b368475fcd197cdc46af28485bc816ec82dc5 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 15 Jul 2026 03:06:39 +0800 Subject: [PATCH] feat(admin): expand native product commerce meta fields Align product edit meta box with REST-backed shipping/service/limit fields: fee type, free-shipping threshold, delivery/service tips, rebate, params, and buyer required info. --- docs/zibll-gap-matrix.md | 4 +- .../shop/class-aksrt-product-meta-box.php | 93 ++++++++++++++++++- 2 files changed, 93 insertions(+), 4 deletions(-) diff --git a/docs/zibll-gap-matrix.md b/docs/zibll-gap-matrix.md index ae2394c3..a0ac5802 100644 --- a/docs/zibll-gap-matrix.md +++ b/docs/zibll-gap-matrix.md @@ -99,8 +99,8 @@ Note: zibll「商品管理」`zibpay_product_page` is **paid article sales**, no | 2b Shipping/after-sale/coupons/income/rebate | done | | 3 users.php submenus | done | | 4 SPA strip | done (ops routes redirect to native) | -| 5+ behavior parity | in progress — shipping list create + pending-to-ship board; after-sale filters/actions; order note/quick actions; coupons field parity + batch/enable; charge-cards expires + code dump + search/labels | -| 5 remaining | product/forum runtime field parity; express timeline; coupon product_scope UI | +| 5+ behavior parity | in progress — shipping list create + pending-to-ship board; after-sale filters/actions; order note/quick actions; coupons field parity + batch/enable; charge-cards expires + code dump + search/labels; product meta shipping/service/limit fields | +| 5 remaining | forum runtime field parity; express timeline; coupon product_scope UI | ## Dual-UI rule diff --git a/inc/classes/shop/class-aksrt-product-meta-box.php b/inc/classes/shop/class-aksrt-product-meta-box.php index 5365973d..63131aa6 100644 --- a/inc/classes/shop/class-aksrt-product-meta-box.php +++ b/inc/classes/shop/class-aksrt-product-meta-box.php @@ -47,14 +47,24 @@ class AKSRT_Product_Meta_Box { $gallery = is_array($gallery) ? $gallery : []; $shipping_mode = (string) get_post_meta($post->ID, '_aksrt_shipping_mode', true); $shipping_fee = (float) get_post_meta($post->ID, '_aksrt_shipping_fee', true); + $shipping_fee_type = (string) (get_post_meta($post->ID, '_aksrt_shipping_fee_type', true) ?: 'fixed'); + $shipping_fee_free = (float) get_post_meta($post->ID, '_aksrt_shipping_fee_free_amount', true); + $shipping_delivery = (string) get_post_meta($post->ID, '_aksrt_shipping_delivery_desc', true); + $shipping_tip = (string) get_post_meta($post->ID, '_aksrt_shipping_tip', true); $after_sale_policy = (string) get_post_meta($post->ID, '_aksrt_after_sale_policy', true); $support_refund = get_post_meta($post->ID, '_aksrt_support_refund', true); $support_refund = $support_refund === '' ? '1' : (string) $support_refund; + $service = (string) get_post_meta($post->ID, '_aksrt_service', true); + $service_tip = (string) get_post_meta($post->ID, '_aksrt_service_tip', true); $limit_buy = get_post_meta($post->ID, '_aksrt_limit_buy', true); $limit_buy = $limit_buy === '' ? -1 : (int) $limit_buy; + $limit_buy_note = (string) get_post_meta($post->ID, '_aksrt_limit_buy_note', true); $stock_type = (string) (get_post_meta($post->ID, '_aksrt_stock_type', true) ?: 'all'); $pay_modo = (string) (get_post_meta($post->ID, '_aksrt_pay_modo', true) ?: '0'); $start_price = (float) get_post_meta($post->ID, '_aksrt_start_price', true); + $product_rebate = (string) get_post_meta($post->ID, '_aksrt_product_rebate', true); + $product_params = (string) get_post_meta($post->ID, '_aksrt_product_params', true); + $user_required = (string) get_post_meta($post->ID, '_aksrt_user_required', true); $delivery_note = (string) get_post_meta($post->ID, '_aksrt_delivery_note', true); $marketing = (string) get_post_meta($post->ID, '_aksrt_marketing_headline', true); @@ -69,6 +79,11 @@ class AKSRT_Product_Meta_Box { 'all' => __('统一库存', 'aksrt'), 'opts' => __('按选项/变体', 'aksrt'), ]; + $fee_types = [ + 'free' => __('包邮', 'aksrt'), + 'fixed' => __('固定运费', 'aksrt'), + 'amount_free' => __('满额包邮', 'aksrt'), + ]; ?>