[WordPress] 外掛分享: Woo Product Shortcodes (Free)

首頁外掛目錄 › Woo Product Shortcodes (Free)
WordPress 外掛 Woo Product Shortcodes (Free) 的封面圖片
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
300+
安裝啟用
★★★★
4.7/5 分(3 則評價)
2135 天前
最後更新
問題解決
WordPress 4.3+ v2.2 上架:2017-07-29

內容簡介

有時您在文章、頁面或首頁中提到產品時,會引用價格、產品名稱或 SKU。
透過此外掛,您可以使用縮短語代碼(shortcode)替換靜態文本,讓值動態從您的 WooCommerce 商店中提取。
特別是當涉及到價格時非常有用,因為價格可能經常變動,導致舊的靜態文本過時。

開始使用縮短語代碼來顯示價格:
[woo-product-shortcodes id=”20″ data_attribute=”price”]

您可以使用資料屬性(data attributes)來顯示「名稱」、「簡介」、「SKU」、「價格」、「定價」、「折扣價格」等等。詳情請參閱常見問題解答。

常見問題解答
我該使用哪個縮短語代碼?

[woo-product-shortcodes id=”20″ data_attribute=“price”]

此縮短語代碼有兩個變數:
1)id = WooCommerce 商店中的產品 ID
2)data_attribute = 這定義了顯示什麼文字 - 詳情請參閱下方的可能選項

我可以使用什麼資料屬性?

data_attribute=”name”
這將顯示產品名稱

data_attribute=”short_description”
這將顯示產品簡介

data_attribute=”sku”
這將顯示產品 SKU

data_attribute=”price”
這將顯示產品的價格。如果產品在特價期間,則會自動顯示特價價格。

data_attribute=”regular_price”
這將顯示產品的定價

data_attribute=”sale_price”
這將顯示產品的特價價格

錯誤代碼
ERR001:未定義有效的屬性。

原因:在頁面/文章中未定義要返回和顯示的資料屬性。
修復:新增帶有允許的值的 data_attribute 變數到縮短語代碼中

ERR002:定義了無效的屬性。

原因:定義了資料屬性,但其不是允許的值
修復:從常見問答資訊中閱讀允許的 data_attribute 選項列表,並使用正確的屬性更新縮短語代碼

外掛標籤

開發者團隊

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

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

原文外掛簡介

Sometimes you refer to a product in a post, page or on your homepage with reference to a price, product name or SKU.
With this plugin, you can replace the static text with a shortcode so the values are pulled dynamically from your woocommerce store.
Especially useful when referring to the price as this can change regularly leaving old static text out of date.
To get started, use the shortcode to show the price:
[woo-product-shortcodes id=”20″ data_attribute=”price”]
Use can use data_attributes for “name”, “short_description”, “sku”, “price”, “regular_price”, “sale_price” and more. See FAQ for details.
FAQ // Frequently Asked Questions
What shortcode do I use?
[woo-product-shortcodes id=”20″ data_attribute=“price”]
There are two variables to the shortcode:
1) id = the product id from the woocommerce shop
2) data_attribute = this defined what text will be shown – see below for possible options
What data attributes can I use?
data_attribute=”name”
This will show the name of the product
data_attribute=”short_description”
This will show the short description of the product
data_attribute=”sku”
This will show the SKU of the product
data_attribute=”price”
This will show the price of the product. If the product is on sale, then the sale price will be shown automatically.
data_attribute=”regular_price”
This will show the regular price of the product
data_attribute=”sale_price”
This will show the sale price of the product
Error Codes
ERR001: No valid attribute defined.
REASON: This is triggered when you have not defined which data_attribute to return and show on the page/post.
FIX: Add the data_attribute variable to the shortcode with a permitted value
ERR002: Invalid data_attribute defined.
REASON: This is triggered when you have defined data_attribute but its not a permitted value
FIX: Read the list of permitted data_attribute options from FAQ and update your shortcode with a correct data_attribute

延伸相關外掛

文章
Filter
Apply Filters
Mastodon