Skip to content

Seven Gum Commerce Pro v4.0 — Amazon Seller Suite - #109

Closed
QodeXcli wants to merge 4 commits into
mainfrom
claude/seven-gum-commerce-pro-4qzz11
Closed

QodeXcli wants to merge 4 commits into
mainfrom
claude/seven-gum-commerce-pro-4qzz11

Conversation

@QodeXcli

@QodeXcli QodeXcli commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Summary

Imports the existing Seven Gum Commerce Pro WordPress plugin (v3.3.1) under sg-commerce-pro/ and adds the Amazon Seller Suite (v4.0.0). The suite is a full single-page app inside wp-admin (new Amazon Suite menu), built only on Amazon's official SP-API and Ads API.

The commits are split so the baseline import can be reviewed on its own:

  1. chore — the uploaded plugin, unchanged.
  2. feat — suite backend (services, schema, REST API).
  3. feat — app UI, tests, uninstall fixes, docs, version bump.

Modules

  • Profit & P&L (Sellerboard-style)
    • Settled fees joined to orders by order date; estimated fees for unsettled orders.
    • Refunds, storage and subscription fees, reimbursements, ad spend.
    • COGS with sellable-return add-back, custom expenses, month-end forecast.
    • Marketplace-local days (US = Pacific).
  • Orders: per-order profit.
  • Inventory & Restock
    • Velocity that ignores out-of-stock days.
    • Days of cover, stock-out and order-by dates.
    • PO quantity rounded to case pack and MOQ.
    • Warning when stock runs out before inbound arrives.
    • Aged inventory and storage cost.
  • PPC Manager (Ads API v3)
    • Bid optimisation to a target ACoS; pauses bleeding keywords.
    • Search-term harvesting (exact and ASIN) and negatives.
    • Budget pacing.
    • Review / apply / dismiss, auto-apply option, and a change log.
  • Keywords: Brand Analytics Search Query Performance share-of-search tracker, Ads keyword recommendations, and all queries per ASIN.
  • Listing Optimizer: 100-point audit (2025 title policy, backend bytes, images, suppression), content-change alerts, AI rewrite.
  • Hijackers & Buy Box: new-seller, Buy Box lost and competitor price-drop alerts, plus price/BSR history.
  • Review Requests: Solicitations API "Request a Review", 5–30 days after delivery; skips refunded or returned orders.
  • Reimbursements: lost/damaged FBA inventory, refunded-but-not-returned orders, FBA fee overcharges, each with a ready-to-paste case message.
  • Also included: Traffic & Returns, Product Research (catalog search, BSR sales estimate, fee estimate, profitability calculator), Reports Center, Alerts (with email), Settings.
  • Demo mode: a deterministic 90-day sample account for the 19 SKUs. Everything it writes is flagged and removed exactly.

Infrastructure

  • 24 sg_suite_* tables with idempotent upserts.
  • Report pipeline: request → poll → download → gunzip → ingest.
  • Windowed, resumable Finances sync.
  • 45 REST routes under sg-commerce/v1/suite, all manage_options.
  • Ads secrets encrypted with AES-256-GCM and never returned to the browser.

Fixes to the baseline

  • Uninstall now drops sg_inbound_plans, sg_product_ean and all suite tables.
  • It removes every sg_commerce_* option; carton templates and the sandbox flag were previously left behind.
  • It also clears Action Scheduler jobs.

Testing

  • php tests/unit.php: 79/79 pass. Covers financial-event flattening, report parsing, bid / search-term / budget rules, restock maths, listing scoring and the profitability calculator.
  • tests/integration-smoke.php against a real WordPress 6.6.2 install (SQLite): all OK.
    • Seeds demo data and calls every REST route.
    • Checks secrets are encrypted and never echoed, and that anonymous requests are rejected.
    • Checks demo cleanup leaves nothing behind.
  • Headless Chromium walkthrough of all 15 screens: no JS errors and no failed API calls.
  • Live-API code paths (orders, finances, reports, monitor, reviews, reimbursements) run in the plugin's existing Sandbox mode with no exceptions.
  • wp plugin uninstall: 0 tables, 0 options and 0 cron events remain.
  • Not tested: real SP-API and Ads API calls, because no Amazon credentials are available here. Payload shapes follow the official API models.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Eah55ppdxG4RKiN2DNeKwx


Generated by Claude Code

claude added 4 commits October 2, 2026 03:39
…s baseline

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Eah55ppdxG4RKiN2DNeKwx
…ock, reviews, reimbursements, monitor, keywords, research)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Eah55ppdxG4RKiN2DNeKwx
…ll, v4.0.0

- Single-page wp-admin app (15 screens) with SVG charts, sortable/CSV tables, drawers
- Demo account seeds alerts and a PPC plan; restock flags stock-out gaps before inbound
- Fix WAREHOUSE_DAMAGE-style adjustment types being misclassified
- Uninstall removes every sg_commerce_*/sg_suite_* option, table, cron and AS job
- 79 unit tests + WordPress integration smoke test; README and CHANGELOG

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Eah55ppdxG4RKiN2DNeKwx
…-DOM

- h() no longer has an innerHTML ('html') branch; add() inserts every
  non-object value as a text node and only appends real Nodes.
- toast() sets its message via textContent.
- Route and PPC-tab dispatch resolve keys against an allow-list (pick())
  instead of indexing objects with user-controlled strings.
- Remove the unused esc() helper; add a missing semicolon.

Local CodeQL (javascript security-and-quality suite): 0 alerts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Eah55ppdxG4RKiN2DNeKwx

QodeXcli commented Oct 2, 2026

Copy link
Copy Markdown
Owner Author

Closing as superseded: the full plugin (v4.1.1, including everything in this PR) now lives in QodeXcli/amazon-commerce- and was merged there in PR #1.


Generated by Claude Code

@QodeXcli QodeXcli closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants