feat: remove shop feature (Phase 2)

Delete all shop domain classes, controllers, schema builders, templates,
JS/CSS, admin SPA pages, and shop-only payment classes (Shipping,
AfterSale, Discount). Remove shop-only DB table definitions (product_variant,
after_sale, order_shipping, card_key) from migrator and add their DROP
to uninstall.php. Clean up shared files:

- Remove aksrt_product CPT + taxonomies from Setup.php
- Remove shop rewrite rules/query vars/template redirect from SetupPart2.php
- Remove shop widget areas from SetupPart1.php
- Remove shop enqueues from ScriptsPart1b.php
- Remove sepakerator-aksrt-shop from SetupPart2.php
- Remove get_shop_settings facade (delete ForumShop.php, clean DomainGroups.php)
- Remove ORDER_PRODUCT_SHOP constant from DomainModel.php
- Remove Shop::class fallback branches from UserOrders.php, OrderCenterRest.php
- Remove shipping/after-sale branches from OrderRepositoryAdmin.php, PayMenus.php, PayOrders.php
- Remove shop product widgets from widgets-register.php
- Remove cart page from template-registry.php, routing.php, ScriptsPart2.php
- Remove cart UI from sidebar-nav.php, profile-orders.php, sidebar-orders.php
- Clean up order-center.js (remove rebuy/cartUrl/receipt/after-sale handlers)
- Remove aksrt_get_cart_page_url/product_page/product_edit from transactions.php
- Clean up aksrt_product_cat references in Coupon.php, PayCoupons.php

Shared payment/order/credits/content-pay stack fully retained.
This commit is contained in:
kate522 committed 2026-08-02 21:25:52 +08:00
1 parent 2bbd7c01a3
commit 1d2505356e
103 files changed
+46 -21267

No files matched your search

@@ -1,49 +0,0 @@
export const basicSchema = {
key: 'shop.basic',
title: '商城基础',
icon: 'fas fa-store',
description: '商城总开关、首页链接、面包屑和 URL 别名设置。',
defaults: {
shop_s: true,
shop_home_url: '',
shop_breadcrumbs_s: true,
shop_breadcrumbs_home: true,
shop_breadcrumbs_shop_home: false,
shop_breadcrumbs_shop_home_name: '商城首页',
shop_product_rewrite_slug: 'product',
shop_cart_rewrite_slug: 'cart',
shop_rewrite_suffix_html_s: true,
},
groups: [
{
key: 'general',
title: '商城开关',
icon: 'fas fa-power-off',
fields: [
{ key: 'shop_s', label: '启用商城', type: 'switch', default: true },
{ key: 'shop_home_url', label: '商城首页链接', type: 'input', default: '', help: '留空使用默认商城页面', dependsOn: { key: 'shop_s', value: true } },
],
},
{
key: 'breadcrumbs',
title: '面包屑',
icon: 'fas fa-angle-double-right',
fields: [
{ key: 'shop_breadcrumbs_s', label: '显示面包屑', type: 'switch', default: true, dependsOn: { key: 'shop_s', value: true } },
{ key: 'shop_breadcrumbs_home', label: '显示首页链接', type: 'switch', default: true, dependsOn: { key: 'shop_breadcrumbs_s', value: true } },
{ key: 'shop_breadcrumbs_shop_home', label: '显示商城首页', type: 'switch', default: false, dependsOn: { key: 'shop_breadcrumbs_s', value: true } },
{ key: 'shop_breadcrumbs_shop_home_name', label: '商城首页名称', type: 'input', default: '商城首页', dependsOn: { key: 'shop_breadcrumbs_s', value: true } },
],
},
{
key: 'rewrite',
title: 'URL 别名',
icon: 'fas fa-link',
fields: [
{ key: 'shop_product_rewrite_slug', label: '商品 URL 别名', type: 'input', default: 'product', dependsOn: { key: 'shop_s', value: true } },
{ key: 'shop_cart_rewrite_slug', label: '购物车 URL 别名', type: 'input', default: 'cart', dependsOn: { key: 'shop_s', value: true } },
{ key: 'shop_rewrite_suffix_html_s', label: '.html 伪静态后缀', type: 'switch', default: true, dependsOn: { key: 'shop_s', value: true } },
],
},
],
}
@@ -1,32 +0,0 @@
export const contactSchema = {
key: 'shop.contact',
title: '客服配置',
icon: 'fas fa-headset',
description: '商品详情页客服按钮和联系方式配置。',
defaults: {
shop_contact_msg_s: true,
shop_contact_name: '联系客服',
shop_contact_note: '',
shop_contact_more: '',
},
groups: [
{
key: 'button',
title: '客服按钮',
icon: 'fas fa-comment-dots',
fields: [
{ key: 'shop_contact_msg_s', label: '显示客服按钮', type: 'switch', default: true },
{ key: 'shop_contact_name', label: '按钮文案', type: 'input', default: '联系客服', dependsOn: { key: 'shop_contact_msg_s', value: true } },
{ key: 'shop_contact_note', label: '客服备注', type: 'textarea', default: '', dependsOn: { key: 'shop_contact_msg_s', value: true } },
],
},
{
key: 'channels',
title: '联系方式',
icon: 'fas fa-address-book',
fields: [
{ key: 'shop_contact_more', label: '多客服联系方式', type: 'textarea', default: '', help: '每行一个:名称|图标|链接|二维码图片 URL' },
],
},
],
}
@@ -1,21 +0,0 @@
/**
* Shop & Product domain schemas.
*/
import { basicSchema } from './basic.js'
import { listSchema } from './list.js'
import { contactSchema } from './contact.js'
import { singleSchema } from './single.js'
import { productDefaultsSchema } from './product-defaults.js'
import { shippingConfigSchema } from './shipping-config.js'
import { timingSchema } from './timing.js'
export const shopSchemas = {
basic: basicSchema,
list: listSchema,
contact: contactSchema,
single: singleSchema,
productDefaults: productDefaultsSchema,
shippingConfig: shippingConfigSchema,
timing: timingSchema,
}
@@ -1,40 +0,0 @@
export const listSchema = {
key: 'shop.list',
title: '商品列表',
icon: 'fas fa-th-list',
description: '商品列表排序、分页、卡片样式和销量显示配置。',
defaults: {
shop_list_orderby: 'date',
shop_list_count: 12,
shop_list_paging: 'number',
shop_list_ias_s: false,
shop_list_ias_max: 5,
shop_list_style: 'default',
shop_sales_show: 'show',
shop_sales_show_min: 10,
},
groups: [
{
key: 'pagination',
title: '列表分页',
icon: 'fas fa-layer-group',
fields: [
{ key: 'shop_list_orderby', label: '默认排序', type: 'select', default: 'date', options: [{ label: '最新发布', value: 'date' }, { label: '销量最高', value: 'sales' }, { label: '价格最低', value: 'price_asc' }, { label: '价格最高', value: 'price_desc' }, { label: '评价最多', value: 'comments' }] },
{ key: 'shop_list_count', label: '每页数量', type: 'number', default: 12, min: 4, max: 100 },
{ key: 'shop_list_paging', label: '翻页模式', type: 'radio', default: 'number', options: [{ label: '数字翻页', value: 'number' }, { label: 'AJAX 加载', value: 'ajax' }] },
{ key: 'shop_list_ias_s', label: '滚动自动加载', type: 'switch', default: false, dependsOn: { key: 'shop_list_paging', value: 'ajax' } },
{ key: 'shop_list_ias_max', label: '自动加载页数', type: 'number', default: 5, min: 1, max: 50, dependsOn: { key: 'shop_list_ias_s', value: true } },
],
},
{
key: 'style',
title: '列表样式',
icon: 'fas fa-palette',
fields: [
{ key: 'shop_list_style', label: '卡片样式', type: 'select', default: 'default', options: [{ label: '默认', value: 'default' }, { label: '竖向大卡片', value: 'card-lg' }, { label: '横向小卡片', value: 'card-sm' }] },
{ key: 'shop_sales_show', label: '销量显示', type: 'select', default: 'show', options: [{ label: '显示', value: 'show' }, { label: '不显示', value: 'hide' }, { label: '超量显示', value: 'threshold' }] },
{ key: 'shop_sales_show_min', label: '起显阈值', type: 'number', default: 10, min: 0, max: 99999, help: '销量超过此数字才显示', dependsOn: { key: 'shop_sales_show', value: 'threshold' } },
],
},
],
}
@@ -1,54 +0,0 @@
export const productDefaultsSchema = {
key: 'shop.product-defaults',
title: '商品默认参数',
icon: 'fas fa-sliders-h',
description: '主题级商品参数默认值,作为「商品→分类→主题设置」参数继承链的根。',
defaults: {
shop_limit_buy: -1,
shop_shipping_fee: 'free',
shop_guest_buy: false,
shop_email_fill: false,
shop_rebate: true,
shop_after_sale: 'refund_return',
shop_service: '',
shop_product_params_default: '',
},
groups: [
{
key: 'policy',
title: '购买策略',
icon: 'fas fa-shopping-bag',
fields: [
{ key: 'shop_limit_buy', label: '默认限购', type: 'number', default: -1, min: -1, max: 9999, help: '-1 不限,0 禁购,正数为限购数量' },
{ key: 'shop_guest_buy', label: '免登录购买', type: 'switch', default: false },
{ key: 'shop_email_fill', label: '邮箱必留', type: 'switch', default: false },
{ key: 'shop_rebate', label: '允许返佣', type: 'switch', default: true },
],
},
{
key: 'shipping',
title: '运费默认',
icon: 'fas fa-truck',
fields: [
{ key: 'shop_shipping_fee', label: '默认运费类型', type: 'select', default: 'free', options: [{ label: '包邮', value: 'free' }, { label: '固定运费', value: 'fixed' }, { label: '按金额计算', value: 'amount' }] },
],
},
{
key: 'afterSale',
title: '售后与服务',
icon: 'fas fa-undo',
fields: [
{ key: 'shop_after_sale', label: '默认售后政策', type: 'select', default: 'refund_return', options: [{ label: '仅退款', value: 'refund' }, { label: '退货退款', value: 'refund_return' }, { label: '不支持售后', value: 'none' }] },
{ key: 'shop_service', label: '服务保障', type: 'textarea', default: '', help: '每行一项:名称|说明|图标图片 URL' },
],
},
{
key: 'params',
title: '默认参数模板',
icon: 'fas fa-list-alt',
fields: [
{ key: 'shop_product_params_default', label: '商品参数模板', type: 'textarea', default: '', help: '每行一个参数:参数名|参数值,新建商品自动带入' },
],
},
],
}
@@ -1,52 +0,0 @@
export const shippingConfigSchema = {
key: 'shop.shipping-config',
title: '物流配置',
icon: 'fas fa-shipping-fast',
description: '快递查询接口、物流公司列表和收货地址设置。',
defaults: {
shop_manual_address: false,
shop_express_api_sdk: 'kuaidi100',
shop_express_query_interval: 60,
shop_express_kdniao_opt: '',
shop_express_kuaidi100_opt: '',
shop_express_aliyun_opt: '',
shop_shipping_company: '',
},
groups: [
{
key: 'address',
title: '收货地址',
icon: 'fas fa-map-marker-alt',
fields: [
{ key: 'shop_manual_address', label: '手动填写收货地址', type: 'switch', default: false, help: '开启后用户可手动输入地址而非选择地址簿' },
],
},
{
key: 'express',
title: '快递查询',
icon: 'fas fa-search',
fields: [
{ key: 'shop_express_api_sdk', label: '快递查询接口', type: 'select', default: 'kuaidi100', options: [{ label: '快递100', value: 'kuaidi100' }, { label: '阿里云', value: 'aliyun' }, { label: '快递鸟', value: 'kdniao' }] },
{ key: 'shop_express_query_interval', label: '查询刷新间隔(分钟)', type: 'number', default: 60, min: 30, max: 240 },
],
},
{
key: 'credentials',
title: '接口凭据',
icon: 'fas fa-key',
fields: [
{ key: 'shop_express_kdniao_opt', label: '快递鸟凭据', type: 'textarea', default: '', help: 'AppID|APIKey', dependsOn: { key: 'shop_express_api_sdk', value: 'kdniao' } },
{ key: 'shop_express_kuaidi100_opt', label: '快递100凭据', type: 'textarea', default: '', help: 'Key|Customer', dependsOn: { key: 'shop_express_api_sdk', value: 'kuaidi100' } },
{ key: 'shop_express_aliyun_opt', label: '阿里云凭据', type: 'textarea', default: '', help: 'AppCode', dependsOn: { key: 'shop_express_api_sdk', value: 'aliyun' } },
],
},
{
key: 'companies',
title: '物流公司',
icon: 'fas fa-building',
fields: [
{ key: 'shop_shipping_company', label: '物流公司列表', type: 'textarea', default: '', help: '每行一个:编码|名称,如 SF|顺丰速运' },
],
},
],
}
@@ -1,45 +0,0 @@
export const singleSchema = {
key: 'shop.single',
title: '商品详情',
icon: 'fas fa-box-open',
description: '商品详情页布局、相关推荐和底部内容设置。',
defaults: {
shop_content_layout: 'adapt',
shop_content_show_bg: false,
shop_single_tab: '',
shop_content_after: '',
shop_single_related_s: true,
shop_single_related_opt: '',
shop_main_image_default: '',
},
groups: [
{
key: 'layout',
title: '详情页布局',
icon: 'fas fa-columns',
fields: [
{ key: 'shop_content_layout', label: '内容布局', type: 'select', default: 'adapt', options: [{ label: '适应宽度', value: 'adapt' }, { label: '全屏', value: 'full' }, { label: '适应宽度+侧栏', value: 'sidebar' }] },
{ key: 'shop_content_show_bg', label: '详情背景盒子', type: 'switch', default: false },
{ key: 'shop_single_tab', label: '自定义 TAB 栏目', type: 'textarea', default: '', help: '每行一个 TAB:标题|内容 HTML' },
{ key: 'shop_content_after', label: '详情页底部内容', type: 'textarea', default: '', help: '追加在每个商品详情页底部的 HTML 内容' },
],
},
{
key: 'related',
title: '相关推荐',
icon: 'fas fa-th',
fields: [
{ key: 'shop_single_related_s', label: '显示相关推荐', type: 'switch', default: true },
{ key: 'shop_single_related_opt', label: '推荐配置', type: 'textarea', default: '', help: '标题|关联类型(cat/discount/tag)|排序|数量|翻页|样式', dependsOn: { key: 'shop_single_related_s', value: true } },
],
},
{
key: 'image',
title: '商品图片',
icon: 'fas fa-image',
fields: [
{ key: 'shop_main_image_default', label: '默认商品主图', type: 'media', default: '' },
],
},
],
}
@@ -1,54 +0,0 @@
export const timingSchema = {
key: 'shop.timing',
title: '时效与售后原因',
icon: 'fas fa-clock',
description: '确认收货、评价、退货时效和售后原因配置。',
defaults: {
shop_order_receipt_max_day: 15,
shop_comment_max_day: 7,
shop_comment_placeholder: '',
shop_comment_img_num: 3,
shop_after_sale_return_express_max_day: 7,
shop_after_sale_reason_refund: '',
shop_after_sale_reason_return: '',
shop_author_show: true,
},
groups: [
{
key: 'receipt',
title: '确认收货',
icon: 'fas fa-check-circle',
fields: [
{ key: 'shop_order_receipt_max_day', label: '自动确认收货(天)', type: 'number', default: 15, min: 1, max: 60, help: '发货后超过此天数自动确认收货' },
],
},
{
key: 'comment',
title: '评价时效',
icon: 'fas fa-star',
fields: [
{ key: 'shop_comment_max_day', label: '评价时效(天)', type: 'number', default: 7, min: 1, max: 60, help: '确认收货后超过此天数自动好评' },
{ key: 'shop_comment_placeholder', label: '评价占位文案', type: 'input', default: '' },
{ key: 'shop_comment_img_num', label: '评价图片数', type: 'number', default: 3, min: 0, max: 9 },
],
},
{
key: 'afterSale',
title: '售后退货',
icon: 'fas fa-undo-alt',
fields: [
{ key: 'shop_after_sale_return_express_max_day', label: '退货快递时效(天)', type: 'number', default: 7, min: 1, max: 30 },
{ key: 'shop_after_sale_reason_refund', label: '仅退款原因', type: 'textarea', default: '', help: '每行一个可选原因' },
{ key: 'shop_after_sale_reason_return', label: '退货退款原因', type: 'textarea', default: '', help: '每行一个可选原因' },
],
},
{
key: 'author',
title: '商家信息',
icon: 'fas fa-user-tie',
fields: [
{ key: 'shop_author_show', label: '显示商家信息', type: 'switch', default: true },
],
},
],
}