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:
1 parent
2bbd7c01a3
commit
1d2505356e
103 files changed
+46
-21267
No files matched your search
@@ -261,24 +261,6 @@ trait DBMigratorPart2 {
|
||||
) {$charset_collate};";
|
||||
dbDelta($sql_restriction);
|
||||
|
||||
// ---------- 13. 商品变体/SKU ----------
|
||||
$sql_variant = "CREATE TABLE {$prefix}aksrt_product_variant (
|
||||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
product_id BIGINT UNSIGNED NOT NULL,
|
||||
sku VARCHAR(64) NOT NULL DEFAULT '',
|
||||
attributes TEXT DEFAULT NULL,
|
||||
price DECIMAL(10,2) NOT NULL DEFAULT 0,
|
||||
stock INT NOT NULL DEFAULT 0,
|
||||
image VARCHAR(512) NOT NULL DEFAULT '',
|
||||
sort_order INT NOT NULL DEFAULT 0,
|
||||
created_at DATETIME NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY idx_product (product_id),
|
||||
KEY idx_sku (sku),
|
||||
KEY idx_sort (sort_order)
|
||||
) {$charset_collate};";
|
||||
dbDelta($sql_variant);
|
||||
|
||||
// ── follow ──
|
||||
$sql_follow = "CREATE TABLE {$prefix}aksrt_follow (
|
||||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
@@ -329,64 +311,6 @@ trait DBMigratorPart2 {
|
||||
) {$charset_collate};";
|
||||
dbDelta($sql_coupon_usage);
|
||||
|
||||
// ── after_sale ──
|
||||
$sql_after_sale = "CREATE TABLE {$prefix}aksrt_after_sale (
|
||||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
order_number VARCHAR(32) NOT NULL DEFAULT '',
|
||||
user_id BIGINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
type VARCHAR(20) NOT NULL DEFAULT 'refund',
|
||||
reason TEXT NOT NULL,
|
||||
status VARCHAR(20) NOT NULL DEFAULT 'pending',
|
||||
amount DECIMAL(10,2) NOT NULL DEFAULT 0,
|
||||
note TEXT DEFAULT NULL,
|
||||
operator_id BIGINT UNSIGNED DEFAULT NULL,
|
||||
operator_note TEXT DEFAULT NULL,
|
||||
refund_request_id VARCHAR(64) DEFAULT NULL,
|
||||
provider VARCHAR(32) NOT NULL DEFAULT '',
|
||||
provider_refund_id VARCHAR(128) NOT NULL DEFAULT '',
|
||||
provider_status VARCHAR(24) NOT NULL DEFAULT 'not_started',
|
||||
refund_effect_status VARCHAR(24) NOT NULL DEFAULT 'not_started',
|
||||
refund_error TEXT DEFAULT NULL,
|
||||
refund_attempts INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
refund_requested_at DATETIME DEFAULT NULL,
|
||||
provider_updated_at DATETIME DEFAULT NULL,
|
||||
refund_succeeded_at DATETIME DEFAULT NULL,
|
||||
refund_effected_at DATETIME DEFAULT NULL,
|
||||
order_status_before VARCHAR(20) NOT NULL DEFAULT '',
|
||||
created_at DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
updated_at DATETIME DEFAULT NULL,
|
||||
resolved_at DATETIME DEFAULT NULL,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY uniq_refund_request (refund_request_id),
|
||||
KEY idx_order (order_number),
|
||||
KEY idx_user (user_id),
|
||||
KEY idx_status (status),
|
||||
KEY idx_type (type),
|
||||
KEY idx_provider_status (provider_status),
|
||||
KEY idx_created (created_at)
|
||||
) {$charset_collate};";
|
||||
dbDelta($sql_after_sale);
|
||||
|
||||
// ── order_shipping ──
|
||||
$sql_shipping = "CREATE TABLE {$prefix}aksrt_order_shipping (
|
||||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
order_number VARCHAR(32) NOT NULL DEFAULT '',
|
||||
carrier VARCHAR(60) NOT NULL DEFAULT '',
|
||||
tracking_no VARCHAR(128) NOT NULL DEFAULT '',
|
||||
status VARCHAR(20) NOT NULL DEFAULT 'shipped',
|
||||
note TEXT DEFAULT NULL,
|
||||
operator_id BIGINT UNSIGNED DEFAULT NULL,
|
||||
created_at DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
updated_at DATETIME DEFAULT NULL,
|
||||
delivered_at DATETIME DEFAULT NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY idx_order (order_number),
|
||||
KEY idx_status (status),
|
||||
KEY idx_tracking (tracking_no),
|
||||
KEY idx_created (created_at)
|
||||
) {$charset_collate};";
|
||||
dbDelta($sql_shipping);
|
||||
|
||||
// ── charge_card (zibll-style typed card_pass) ──
|
||||
$sql_charge_card = "CREATE TABLE {$prefix}aksrt_charge_card (
|
||||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
@@ -461,25 +385,6 @@ trait DBMigratorPart2 {
|
||||
) {$charset_collate};";
|
||||
dbDelta($sql_order_items);
|
||||
|
||||
// ── card_key 卡密表 (§6.2 自动发货) ──
|
||||
$sql_card_key = "CREATE TABLE {$prefix}aksrt_card_key (
|
||||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
product_id BIGINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
options_key VARCHAR(255) NOT NULL DEFAULT '',
|
||||
card_code TEXT NOT NULL,
|
||||
status VARCHAR(20) NOT NULL DEFAULT 'available',
|
||||
order_number VARCHAR(32) NOT NULL DEFAULT '',
|
||||
used_by BIGINT UNSIGNED DEFAULT NULL,
|
||||
used_at DATETIME DEFAULT NULL,
|
||||
created_at DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
PRIMARY KEY (id),
|
||||
KEY idx_product (product_id),
|
||||
KEY idx_options (options_key(50)),
|
||||
KEY idx_status (status),
|
||||
KEY idx_order (order_number)
|
||||
) {$charset_collate};";
|
||||
dbDelta($sql_card_key);
|
||||
|
||||
self::migrate_identity_tables($prefix, $charset_collate);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user