[WordPress] 外掛分享: WC External Variations

首頁外掛目錄 › WC External Variations
300+
安裝啟用
★★★★★
5/5 分(8 則評價)
132 天前
最後更新
問題解決
WordPress 4.7+ PHP 5.6.0+ v1.0.18 上架:2018-06-03

內容簡介

這個外掛為WooCommerce的變化 / 變動產品基本功能提供了基本支援,允許您在任何變化上定義外部URL,並當用戶點擊添加到購物車按鈕時打開該鏈接。因為使用Javascript,所以任何透過API在後端進行的添加到購物車都無法正確重定向。

注意,截至03/2023,此外掛不再有更新開發。

簡碼支援

此外掛提供了兩個簡碼,可在您的網站內使用:
1. [wcev_product_attr] - 允許您顯示產品屬性,使用“name”屬性找到正確的屬性。
2. [wcev_var_field] - 允許您顯示變化的自定義字段、屬性或數據元素,使用“id”屬性指向正確的字段。
優先順序如下:自定義字段、屬性,然後數據元素。
3. [wcev_var_postdate] - 其他變化的時間和日期格式,不需要屬性。

外部SKU和狀態字段

除了外部URL字段之外,每個變化還提供了第二個字段,稱為“外部SKU”。您可以設置此字段,然後使用提供的簡碼來顯示它。目的是隨時追蹤外部SKU而不是內部SKU。

現在有能力在特定變化中指定“添加到按鈕”文本。如果設置全球設置,則變化特定的字段將覆蓋它。

設置

要更改設置,請進入WooCommerce設置 ->產品 ->外部變化。提供以下選項:
*更改鏈接在新窗口或同一窗口中打開的能力
*更改在單擊“添加到購物車”按鈕或選擇變體時打開鏈接的能力
*覆蓋所有外部變化的“添加到購物車”按鈕文本

更多細節

請注意,此外掛僅在純淨的WordPress / WooCommerce安裝中進行了測試,沒有其他插件。如果您有修改添加到購物車按鈕功能的其他插件,則此外掛可能無法正常工作或導致意外後果。

此外掛的源代碼可在Github找到。

您可以在WordPress.org上找到這個外掛。

已知問題

當變化數量超過30個時,該插件將停止工作。這是由於WooCommerce的限制造成的,可以通過使用此處描述的篩選器來繞過:https://docs.woocommerce.com/document/change-limit-on-number-of-variations-for-dynamic-variable-product-dropdowns/

外掛標籤

開發者團隊

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

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

原文外掛簡介

Adds basic support for external products to WooCommerce
variations/variable products. This plugin allows you to define an external
URL on any variation and will then open that link when the user
clicks on the Add To Cart button. Because the Javascript is used for this,
any adding to cart that is done via the backend such as with APIs will not
redirect properly.
Note that as of 03/2023 this plugin is not longer under active development.
Shortcode support
This plugin provides two shortcodes that you can use within your site:
1. [wcev_product_attr] – allows you to display an product attribute, use the “name” attribute to find the right attribute.
2. [wcev_var_field] – allows you to display a custom field, attribute or data element for a variation, use the “id” attribute to point to the right field.
The order of precendence is as follows: custom fields, attributes, then data elements.
3. [wcev_var_postdate] – displays the formatted post date and time for a variation, doesn’t take attributes.
External SKU and status fields
In addition to the external URL field, a second field called “External SKU” is provided for each variation.
You can set this field and then use the provided shortcode to display it.
The purpose is to track the external SKU separately from the internal one.
There is now ability to specify the ‘Add to Button’ text in a specific variation. If the global setting is set, the variation-specific field will override it.
Settings
To change settings, go to WooCommerce Settings -> Products -> External Variations. The following are available:
* Ability to change if links open in new or same window
* Ability to change if links open when the ‘Add to Cart’ button is clicked or when the variation is selected
* Ability to override the ‘Add to Cart’ button text for all external variations
More Details
Please note that this plugin has only been tested in a vanilla WordPress / WooCommerce
installation without any other plugins. If you have other plugins that modify
the functionality of the Add to Cart button, this plugin may not work or
cause unintended consequences.
Source code for this plugin can be found at Github
You can find this plugin at WordPress.org
Known Issues
When the number of variations exceeds 30, the plugin stops working. This is due
to a WooCommerce limit and can be bypassed by using a filter as described here:
https://docs.woocommerce.com/document/change-limit-on-number-of-variations-for-dynamic-variable-product-dropdowns/

延伸相關外掛

文章
Filter
Mastodon