
內容簡介
此外掛允許您重複使用描述,並在產品上動態顯示它們。將描述添加到您的類別和產品屬性中,然後將其添加到您的產品描述中或作為單獨的標籤顯示。這樣,您就可以重複使用某些屬性或類別特定的描述,而不必一遍又一遍重寫所有適用產品的所有信息。
此外掛為每個產品類別和屬性稅項創建了一個新字段,可用於添加和顯示與特定類別或屬性相關的其他信息。
預設情況下,將在單獨的標籤中顯示額外信息,並將產品屬性稅名用作標籤標題。標籤的內容將顯示所有適用的屬性標籤描述。額外的欄位還允許您使用HTML、短代碼和特殊的佔位符,這些佔位符將被替換為產品信息。
功能:
顯示WooCommerce產品類別和屬性信息,作為單獨的標籤或產品詳情的一部分。
控制每個WooCommerce屬性稅類型的顯示類型。
使用默認屬性描述欄位或使用預設插件欄位之間切換。
使用優先級值控制每個產品稅類型的標籤順序。
通過屬性設置設置替代標籤標題。
支持在描述中使用佔位符(請參見下文),這些佔位符將被替換為產品數據。
佔位符:
產品屬性
使用{product:property}佔位符可以將文本的某些部分替換為產品屬性:
{product:name}:獲取產品名稱
{product:sku}:獲取產品SKU
{product:weight}:獲取產品重量
{product:height}:獲取產品高度
{product:width}:獲取產品寬度
{product:length}:獲取產品長度
此外,還可以使用類似{product:property:string}的語法在給定子串之前或之後截斷結果字符串。例如:
{product:name:-}會顯示產品名稱,但會截斷-之後的所有內容。
{product:name::-}會顯示產品名稱,但會截斷-之前的所有內容。
兩者情況下都將刪除-字符。
產品屬性
{attribute:taxonomy}佔位符可用於將文本的某些部分替換為產品屬性。將佔位符中的分類部分替換為您希望的任何產品屬性(slug)。
例如,如果您有一個屬性為“顏色”,您可以使用以下佔位符將產品的顏色插入到文本中:{attribute:color}。如果產品附帶了多個顏色,則它們會按逗號分隔列出。
因此,也可以使用類似{attribute:taxonomy:index}的語法僅選擇一個術語。將索引部分替換為一個數字。例如,{attribute:color:1}將顯示產品的第一種顏色。
產品元數據
使用{meta:key}佔位符可將文本的某些部分替換為產品元數據。在佔位符中使用任何來自數據庫的元數據,將key部分替換為它。
產品的元數據也可以像產品屬性一樣進行修剪。
用例:
尺寸指南
假設我們有一個名為Size的產品屬性稅,希望將每個使用此屬性類型的產品的尺寸指南顯示為上述額外信息。只需添加類似於[wccaf_field size_guide]的代碼片段,即可將相關HTML和文字添加到額外信息框中,然後使用佔位符將其插入到產品描述中。
外掛標籤
開發者團隊
② 後台搜尋「Reusable Product Description for WooCommerce」→ 直接安裝(推薦)
原文外掛簡介
This plugin allows you to reuse descriptions and dynamically display them on your products. Add pieces of descriptions to your categories and product attributes, which then are added to your product description or displayed as separate tabs. This allows you to reuse any descriptions that are specific to certain attributes or categories without rewriting all information for every applicable product again and again.
The plugin creates a new field for each product category and attribute taxonomy that can be used to add and display additional information related to a specific category or attribute.
The extra information will be displayed in a separate tab by default with the product attribute taxonomy name as the tab title. The content of the tab will show all applicable attribute tab descriptions. The extra field lets you also use HTML, shortcodes and special placeholders that are replaced with product information.
Features
Display WooCommerce product category and attribute information in a separate tab or in the product detail
Control display type for each WooCommerce attribute taxonomy
Swap between default attribute description field or use the default plugin field
Control the tab order using priority values for each product taxonomy
Set an alternative tab title via attribute settings
Support for placeholders within the description (see below) that are replaced with product data
Placeholders
Product properties
The {product:property} placeholder can be used to replace certain parts of the text with a product property:
{product:name}: get the product name
{product:sku}: get the product SKU
{product:weight}: get the product weight
{product:height}: get the product height
{product:width}: get the product width
{product:length}: get the product length
Additionally, it is possible to truncate the resulting string before or after a given substring with the syntax {product:property:string}. For example:
{product:name:-} would display the product name but cut of everything after -
{product:name::-} would display the product name but cut of everything before -
If both cases the - character is also removed.
Product attributes
The {attribute:taxonomy} placeholder can be used to replace certain parts of the text with a product attribute. Replace the taxonomy part in the placeholder with any product attribute that you wish (slug).
For example, if you have an attribute color, you could use the following placeholder to insert the color of the product into the text: {attribute:color}. If more than one color is attached to the product, they are listed and separated by a comma.
It is therefore also possible to select only one term by using the syntax {attribute:taxonomy:index}. Replace the index part with a number. For example {attribute:color:1} will show the first color of the product.
Product meta data
The {meta:key} placeholder can be used to replace parts of the text with product meta data. Replace the key part in the placeholder with any meta data from the database.
Product meta data can also be trimmed just the like the product properties.
Use Cases
Use Case 1 – Size guide
Let’s say we have a product attribute taxonomy named Size. For all products that are using this attribute type we wish to display a size guide on the product page, which helps the customer to find the right size. We use the plugin to specify a tab description for every size that we configured (e.g. XS, S, M, L, XL). The tab description for a size attribute could for example explain the recommended body measurements that fit this size. Finally, we create a product where we assign the size attribute and select the attribute values S, M and L. On the product page of this product we will now see a new tab named Size that shows the tab descriptions of the size attributes S, M and L.
Use Case 2 – Brand information
We might have products of different brands and for each brand we’d like to display a short description about the brand in the product description. Normally we’d have to copy paste the brand description to every product of this brand. If every something changes… well, it’d be pretty cumbersome. Now let’s say we have a product attribute taxonomy named Brand. With this plugin we can instead add the brand description on attribute term level and automatically display it for every product with that brand assigned. We only manage the description once and display it everywhere.
Use Case 3 – Dynamic product descriptions
We create a new product taxonomy “Product Type” and add the reusable product descriptions there. We configure it to append the description to the main product description. We assign our product type attributes to the according products, but do not display the attribute on the product page. One product can even have more than one product types assigned to dynamically build up a product description. You could also use product categories instead.
