[WordPress] 外掛分享: Ajaxified Cart

首頁外掛目錄 › Ajaxified Cart
WordPress 外掛 Ajaxified Cart 的封面圖片
400+
安裝啟用
★★★★
4.8/5 分(13 則評價)
152 天前
最後更新
問題解決
WordPress 5.8+ PHP 8.0+ v2.0.2 上架:2017-03-13

內容簡介

在 WooCommerce 中,單一產品頁面和變數產品頁面都沒有提供 AJAX 加入購物車的功能。
此外掛可以為單一產品頁面和變數產品頁面添加 AJAX 功能。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.0.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Ajaxified Cart」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

WooCommerce core does not provide AJAX add-to-cart on the single product page or for variable products listed on archive pages (it redirects to the single view). This plugin adds an unobtrusive AJAX workflow for:

Simple products (single product page button becomes AJAX)
Variable products on archive & block-based Product Collection (opens an accessible modal to choose attributes, then adds via AJAX)
Classic themes and modern block/FSE themes (2025 and later) with Product Collection blocks

Highlights:
* Works with WooCommerce fragments (mini-cart updates automatically)
* Accessible modal (focus trap, ESC to close, restore focus)
* Nonce-secured AJAX endpoints; sanitized and validated input
* Settings page to enable/disable variable product archive functionality
* Block theme compatibility (intercepts “Select options” buttons) with slug/product_id fallback
* Performance-minded (loads minified bundles built via Webpack; falls back to source if missing)
* Translations auto-loaded from WordPress.org (no manual POT/PO generation required)
Privacy: This plugin does not send any data to external services. It only uses WooCommerce cart/session APIs.
Development
Build commands:

Install dependencies:
npm install
Production build (minified + source maps):
npm run build
Watch during development:
npm run watch
Lint JS:
npm run lint

Translations: WordPress.org language packs auto-load this plugin’s strings. The former POT/PO/MO tooling and i18n loader file were removed (WP 4.6+). Do not add a load_plugin_textdomain() call; simply keep the Text Domain header accurate.
WooCommerce is a registered trademark of Automattic Inc. This plugin is not affiliated with or endorsed by Automattic/WooCommerce.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon