
內容簡介
如果您正在尋找在您的網站的 WooCommerce 購物車中靈活顯示項目的方法,那就不用再尋找了!此外掛可讓您在網站的任何位置插入短碼,以生成 a href 鏈接。
參數:
icon – 任何 Font Awesome 圖示。大多數情況下,您會想使用 shopping-cart 或 shopping-basket。
empty_cart_text – 當購物車中沒有物品時顯示的文本。您可能希望將此設為「購物」的預設值。
items_in_cart_text – 當購物車中有一個或多個物品時顯示的文本。您可能希望將此設為「購物車」的預設值。
total_text – 當購物車中有一個或多個物品時顯示的文本。您可能希望將此設為「總計:」的預設值。
show_items – 輸入“true/false”以顯示/隱藏圓括號中的購物車項目。只有在購物車中有一個或多個物品時,才會顯示項目計數。
custom_css – 您希望添加到鏈接的任何自定義 CSS。
show_total – 輸入“true/false”以顯示/隱藏購物車中的總價格
範例:
[cart_button]
[cart_button icon="basket"]
[cart_button show_items="true"]
[cart_button show_items="true" show_total="true"]
[cart_button show_items="true" show_total="true" total_text="總價:"]
[cart_button show_items="false" items_in_cart_text="購物車"]
[cart_button show_items="true" empty_cart_text="商店"]
[cart_button items_in_cart_text="購物車" custom_css="custom"]
外掛標籤
開發者團隊
② 後台搜尋「WooCommerce Cart Count Shortcode」→ 直接安裝(推薦)
原文外掛簡介
Looking for a flexible way to display items in your site’s WooCommerce cart? Look no further! This plugin allows you to insert a shortcode anywhere on your site that generates an a href link.
Parameters:
icon – Any Font Awesome icon. Most of the time you’ll want to use shopping-cart or shopping-basket.
empty_cart_text – The text to display when there are zero items in the cart. You may want this to default to “Shop”.
items_in_cart_text – The text to display when there are one or more items in the cart. You may want this to default to “Cart”.
total_text – The text to display when there are one or more items in the cart. You may want this to default to “Total:”.
show_items – Enter “true/false” to show/hide items in the cart in parentheses. The item count will only show when there are one or more items in the cart.
custom_css – Any custom CSS you’d like to add to the link.
show_total – Enter “true/false” to show/hide total price in the cart
Examples:
[cart_button]
[cart_button icon="basket"]
[cart_button show_items="true"]
[cart_button show_items="true" show_total="true"]
[cart_button show_items="true" show_total="true" total_text="Total Price:"]
[cart_button show_items="false" items_in_cart_text="Cart"]
[cart_button show_items="true" empty_cart_text="Store"]
[cart_button items_in_cart_text="Cart" custom_css="custom"]
