前言介紹
- 這款 WordPress 外掛「Enhanced AJAX Add to Cart for WooCommerce」是 2018-06-25 上架。
- 目前有 900 個安裝啟用數。
- 上一次更新是 2024-05-28,距離現在已有 638 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.8.1 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
- 有 11 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
block | shortcode | add to cart | woocommerce | ajax add to cart |
內容簡介
使用區塊或 shortcode,內嵌一個輕量、智能且靈活的「新增至購物車按鈕」與內容並排顯示在任何你想要的頁面上。
這款 WooCommerce 擴充套件可以讓你渲染一個不會重新導向的按鈕,附有數量欄位。在你的網站任何地方創造有效和功能性的按鈕,方便你自己或你的客戶使用!
點擊這裡找到新釋出的專業版 here!
現在的專業版有一個 GROUP shortcode!
[a2c_group_buttons
product={1,2,3,4…}
order={“title,quantity,separator,price,description”} // 任何你想要的順序,也可以用首字母作為引數,例如「q、s、t、p、d」。
class={STRING}
button_text={STRING}
title={none|attribute}
quantity={INTEGER}…
/]
2.0 版的重大變更,請點擊 here。
輕量
我們認為產品及其顯示元件均為輕量的。在客戶完成結帳前的關鍵時刻之一,便是「新增至購物車」互動。基於這一點,我們正在嘗試以 html 和資產的最小負載傳達盡量少的資訊。
不僅如此,如果物件未被顯示(例如標題或價格),則不會產生 html,而是依賴於 css。
智能
為了維持輕量和優化,資產會根據它們的用途分開加載,只有在使用時才會加載!
不僅如此,如果關聯產品現在已售罄(在設定中切換),則按鈕會被禁用(預設情況下)。
靈活
通過區塊介面,你可以完全更改所有產品資訊和按鈕的順序。開關欄位,你可以使區域符合你的想像!
我們在過去使用的許多插件在樣式方面會感到壓倒性,有時會使應用樣式以幫助插件適應你的主題變得困難。
我們把主題留給您,使用一些基本的類用於元素,如按鈕和數量欄位,我們發現大多數主題對元素進行了基本的樣式設置,可以使用。
區塊文件
新的「AJAX 新增至購物車區塊」和新的「群組 AJAX 新增至購物車區塊」!
在擁有區塊編輯器的網站任何頁面上創建有彈性的元件,輕鬆切換顯示並拖放物件以更改前端新增至購物車區域的外觀。
群組 AJAX 新增至購物車區塊的主要區別在於它允許選擇多個產品。該區塊中選擇的顯示設置和樣式將同樣應用於所有產品。
該區塊不僅具有 shortcode 的所有功能,還進一步擴展了這一點,允許你使用視覺編輯器更改每個個別元件的顯示順序!
區塊還具有產品選擇工具,因此你無需再記住單個產品或變體 ID
可用的區塊欄位:
– 標題
– 分隔符
– 價格
– 數量
– 按鈕
– 圖片(專業版設置)
– 自訂文本欄(專業版設置)
– 簡短描述(專業版設置)
Shortcode 文件
新增較短的 Shortcode:[a2c_button
原文外掛簡介
Use the block or shortcode to display a lightweight, smart, and flexible Add to Cart button inline with any content, on any page you desire.
This extension for WooCommerce allows you to render a non-redirect button with an associated quantity field. Create effective and functional buttons to use for your or your customers convenience anywhere on your site you want!
Find the newly released Pro version here!
Premium now has a GROUP shortcode!
[a2c_group_buttons
product={1,2,3,4…}
order={“title,quantity,separator,price,description”} // any order you want, also accepts first letters as arguments “q,s,t,p,d” for example.
class={STRING}
button_text={STRING}
title={none|attribute}
quantity={INTEGER}…
/]
Breaking Changes in 2.0 found here
Lightweight
We consider our product and its displaying components to be lightweight. The Add to Cart interaction is one of the key moments prior to the decision of a customer finishing their checkout. Understanding that, we are trying to deliver the smallest payload possible when it comes to html and assets.
Keeping our html lightweight already, if objects are not displayed (e.g. title or price) then the html is never generated, rather than relying on css.
Smart
Keeping with the theme of lightweight and optimized, assets, which are separated by their uses, will only be loaded when they are used!
Not only that, but the button will become disabled (by default) if the associated product is now out of stock (toggled in the settings).
Flexible
Through the block interface, you can change entirely the order of all parts of the product info & button. Toggling fields on and off, you can make the area fit the way you dream it!
Many plugins we have used in the past feel overbearing when it comes to styling, sometimes making it hard to apply styles to help the plugin fit your theme.
We left the themeing to you, using some base classes on elements like the buttons and quantity fields that we found let most themes do base styling to the elements.
Block Documentation
New “AJAX Add to Cart Block”! and New “Group AJAX Add to Cart Block”!
New and improved interface to create flexible components on any page of your website that has the block editor enabled!
Easily toggle displays and drag-and-drop to move around objects to change the appearance of the add to cart component on the front end.
The major difference between the blocks is the Group AJAX add to cart block allows the selection of multiple products. The selected display settings and styling will be applied to all products the same in that block.
Not only does the block have all the features the shortcode does, but expands further upon that allowing you to change the display order of each individual component using a visual editor!
The block also has a product select tool so you no longer have to remember individual product or variation IDs
Block fields available:
– Title
– Separator
– Price
– Quantity
– Button
– Image (premium setting)
– Custom text field (premium setting)
– Short Description (premium setting)
Shortcode Documentation
New Shorter Shortcode: [a2c_button /] and [ajax_add_to_cart /] are now options for the original [enh_ajax_add_to_cart_button /]
The required field for every button is the product, with six optional fields:
– variation (used for variable products)
– title (to reflect the label before the button)
– quantity (sets the default quantity AND hides the quantity checkbox)
– show_quantity (if quantity is specified, re-enables the checkbox)
– show_price
– button_text
– class
– order (overrides show_quantity, show_price)
Original single button shortcode:
[a2c_button
product={pid}
variation={vid}
class={STRING}
order={"title,quantity,separator,price,description"} // any order you want, also accepts first letters as arguments "q,s,t,p,d" for example.
show_price={beginning|b|after|a|rear|r}
button_text={STRING}
title={none|attributes|att|attribute}
quantity={INTEGER}
show_quantity={yes}
/]
Documentation notes:
– The curly brackets “{ }” denote a list of options separated by a pipe ” | ”
– With the exception of “pid” and “vid” options, the lower case “options” within the curly braces are to represent different settings available for the front end display order. These will soon be deprecated for a new property “order”
– “pid” represents a product id, INTEGER value.
– “vid” represents a variation id, INTEGER value.
– STRING and INTEGER are to represent types.
– INTEGER expects a whole number, and decimals are not fully supported yet.
– STRING can have spaces in it if enclosed in quotes (“This is a string.”) otherwise it will take 1 word.
Legacy shortcodes will remain working and will always take the options above:
[enh_ajax_add_to_cart_button product={pid} variation={vid} /]
[ajax_add_to_cart product={pid} variation={vid} /]
SIMPLE PRODUCT: Use only the required parameters to make a quantity box and add to cart button for a simple product with the title to the left:
[a2c_button product=42 ]
Refer to screenshot 1 below to see the output
VARIABLE PRODUCT: Use the product and variation parameters to make a quantity box and add to cart button for a specific variation of a variable product, with the fully qualified name:
[a2c_button product=3312 variation=3313 ]
Refer to screenshot 2 below to see the output
Use the product and variation parameters to make a quantity box and add to cart button for a specific variation of a variable product, with only the variation attributes listed separated with a space as the name:
[a2c_button product=3312 variation=3313 title=attributes ]
Refer to screenshot 3 below to see the output
Use the product and variation parameters to make a quantity box and add to cart button for a specific variation of a variable product, with no name listed:
[a2c_button product=3312 variation=3313 title=none ]
Refer to screenshot 4 below to see the output
Use the button_text parameter to change the text on the Add to Cart button! (Strips out HTML tags)
Use double quotes ( “like this” ) to get a phrase with spaces
[ajax_add_to_cart product=3312 variation=3313 button_text="Add this to cart!" ]
Use the show_price parameter to make a price field appear, with the options being before the title, after the title but before the quantity/add to cart button, or at the very rear of the line!
Beginning
[ajax_add_to_cart product=3312 variation=3313 show_price=b ]
After Title
[ajax_add_to_cart product=3312 variation=3313 show_price=a ]
Rear (After Button)
[ajax_add_to_cart product=3312 variation=3313 show_price=r ]
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Enhanced AJAX Add to Cart for WooCommerce」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.1.1 | 1.2.2 | 1.3.0 | 1.3.1 | 1.3.2 | 1.3.3 | 1.3.4 | 1.4.0 | 1.5.0 | 1.5.1 | 2.0.0 | 2.1.0 | 2.1.1 | 2.1.2 | 2.1.3 | 2.1.4 | 2.1.5 | 2.2.0 | 2.3.0 | 2.4.0 |
延伸相關外掛(你可能也想知道)
WP Shortcodes Plugin — Shortcodes Ultimate 》Shortcodes Ultimate 是一個全面的視覺與功能性元素收集,您可以在文章編輯器、文字小工具甚至是範本檔案中使用。使用 Shortcodes Ultimate,您可以輕鬆地建...。MW WP Form 》MW WP Form 可以使用 shortcode 創建帶有確認畫面的郵件表單。, , 使用 shortcode 創建表單, 可以使用確認頁面。, 頁面可以使用相同的 URL 或個別的 URL 進行...。
Shortcoder — Create Shortcodes for Anything 》Shortcoder 外掛可讓您建立 HTML、JavaScript、CSS 和其他代碼片段的自訂捷徑。現在,這些捷徑可以在文章/頁面中使用,並且該片段將取代其位置。, ✍ 輕鬆建立...。
Widget Shortcode 》這個短碼需要小工具的ID,但不需要猜測,外掛會為你生成代碼。如果你想要覆蓋小工具的標題,你可以使用 "title" 參數:, [widget id=”text-1″...。
Display Posts – Easy lists, grids, navigation, and more 》Display Posts 讓您輕鬆地列出網站上的所有內容。首先在內容編輯器中新增此短碼,以列出最近的文章清單:, [display-posts], , 按類別篩選, 若只想顯示特定類...。amr shortcode any widget 》使用shortcode將小工具或多個小工具或整個小工具區域(側邊欄)插入到頁面中。, 首先在正常的側邊欄中設置小工具。 檢查它是否正常運作。, 然後將所選小工具...。
Column Shortcodes 》此外掛提供簡單易用的短碼,在您的文章或頁面中輕鬆創建欄位。有時候,您只需要將網頁切成不同的欄位。使用此外掛,您只需選擇一個欄位的短碼,便可將欄位加...。
Shortcode in Menus 》此外掛讓你可以在 WordPress 導覽選單中使用簡碼,以便可以動態生成連結。也可以讓你在導覽選單中添加完整的 HTML 段落。, 使用方法, 查看截圖。, 另外,查看...。
Sidebar Widgets by CodeLights 》❗ 很抱歉,由於 SiteOrigin 的 widgets API 完全更改,CodeLights 不再支援 SiteOrigin Page Builder 的原生使用。解決方案:您仍然可以在純文字編輯器中創...。Insert Pages 》Insert Pages 可讓您使用 Shortcode API,將任何 WordPress 內容(例如,頁面、文章、自訂文章類型)嵌入其他 WordPress 內容。它還包括一個小工具,可將頁面...。
Advanced iFrame 》看起來您正在尋找一個 WordPress 外掛 - Advanced iFrame Pro。這個外掛可讓您使用 iframe 包含其他網頁到您的網站中,同時具有隱藏和修改元素、自動調整高度...。Shortcodes by Angie Makes 》Shortcodes by Angie Makes 外掛為您的 WordPress 主題新增一系列易於使用的短碼,這些短碼與 Angie Makes WordPress 主題 完美搭配。, 範例, 請到此查看這些...。
Forget About Shortcode Buttons 》相容於 WordPress 傳統編輯器,Gutenberg 整合即將推出🙂, 歡迎提出功能需求/建議!, 即忘短碼(FASC)按鈕是在所見即所得編輯器中及網站佈景主題中加入 CSS 按...。
The Events Calendar Shortcode & Block 》標籤內容:, , 使用 The Events Calendar Shortcode 和 Block,在需要顯示活動的地方顯示可自定義的活動列表!此外掛程式完全整合了現代部落客 (Modern Tribe...。
Team Members 》這個外掛會為管理員面板增加一個「團隊」區塊,讓您可以輕鬆地在網站上展示您的員工/職員。您可以快速地將成員加入您的團隊,加入他們的照片、職位、個人簡介...。
