[WordPress] 外掛分享: WooCommerce Quantity Increment

首頁外掛目錄 › WooCommerce Quantity Increment
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
300+
安裝啟用
★★★★★
5/5 分(3 則評價)
2149 天前
最後更新
問題解決
WordPress 4.1+ v1.1.1 上架:2015-11-11

內容簡介

WooCommerce 預設使用數字輸入框顯示購物車數量,因為現在大部分瀏覽器都支援 <input type="number" /> 這個 HTML 標籤。

不過,如果您需要更多控制外觀,您可以安裝並啟用此外掛程式,使用 JavaScript 輸入框顯示數字。

此外掛程式可以選擇性地包含 Number Polyfill ,這是一個 HTML5 <input type="number"> 標籤的 polyfill,可以在還不支援該標籤的瀏覽器上使用。

若需要使用,只需在您的佈景主題的 functions.php 檔案中加入以下程式碼:

add_action( 'wp_enqueue_scripts', 'wcqi_enqueue_polyfill' );
function wcqi_enqueue_polyfill() {
wp_enqueue_script( 'wcqi-number-polyfill' );
}

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1.1) 或搜尋安裝

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

原文外掛簡介

WooCommerce uses number inputs for the cart quantities by default, as most browsers now support .
However, you may want to have JavaScript powered inputs if you want greater control over appearance. Simply install and activate this plugin to do so.
It optionally includes a Number Polyfill, which is a polyfill for implementing the HTML5 element in browsers that do not currently support it.
To include this, add the following code to your theme’s functions.php file:
add_action( 'wp_enqueue_scripts', 'wcqi_enqueue_polyfill' );
function wcqi_enqueue_polyfill() {
wp_enqueue_script( 'wcqi-number-polyfill' );
}

延伸相關外掛

文章
Filter
Apply Filters
Mastodon