內容簡介
讓您上傳一組優惠券代碼以分發給您的使用者。每個優惠券只被認為能夠使用一次。
您可以管理來自不同來源的多組優惠券集。
使用者下次訪問網站時,會顯示一個彈出窗口。他們只有在點擊按鈕後才能看到優惠券,以確保興趣。
使用方法
安裝完畢後,您會在管理區域底部找到一個名為「優惠券」的新菜單項目。所有管理都是在那裡進行的。
有優惠券和優惠券組。
每一個優惠券屬於唯一的一個組,並且有一個價值和到期日。
一個組包含多個優惠券,並定義了在彈出窗口中顯示給使用者的模板。默認情況下,只有已登錄的使用者才能取得優惠券。
首先創建一個新組。給它一個唯一的名稱並撰寫模板。
在編輯器中有四個按鈕,標記彈出視窗的特定區域。鼠標選中該文本,然後按下按鈕進行標記。
操作按鈕:當單擊此按鈕時,優惠券的價值將從後端獲取並顯示。
成功區域:此區域在從後端獲取優惠券之前隱藏。
優惠券價值:此區域將被更換為優惠券的價值。請務必不包含尾隨空格,否則可能會很醜陋。
到期日期:此區域將被替換為優惠券的到期日期。請務必不包含尾隨空格,否則可能會很醜陋。
保存組並添加一些優惠券。您可以添加多個到期日期相同的優惠券。只需確保每個優惠券都有自己的行(空行被忽略)。
現在您準備好了。但您可能想看一下默認設置。在那裡,您可以調整事件之間的延遲時間,以避免向使用者發送垃圾郵件。
自定義
大多數面向用戶的自定義都可以在群組編輯器中進行。如果您想更改能夠獲得優惠券的使用者,可以鉤入 unique_coupons_user_is_authorized_for_coupons 過濾器。目前,沒有辦法向匿名使用者分發優惠券(跟踪是在服務器端完成的)。因此,即使通過此過濾器允許此操作,也將無法使用。
缺點/錯誤
目前,該插件的數據刪除後將會保留。
您無法明確篩選不應顯示彈出視窗的時間。最佳解決方法是鉤入 unique_coupons_user_is_authorized_for_coupons。
貢獻
源代碼托管在 Josef37/unique-coupons 上。
如果您有問題或功能請求,或考慮提交拉取請求,請隨時創建新問題。
還有一個單獨的 開發者 README,可以幫助您設置開發環境。
如果此插件對您有幫助,我希望聽到您的反饋。
外掛標籤
開發者團隊
原文外掛簡介
Allows you to upload a set of coupon codes you want to distribute to your users. Each coupon is assumed to be used only once.
You can manage multiple sets of coupons from different sources.
Your users are shown a popup next time they visit the site. They have are only shown the coupon after clicking a button, to ensure interest.
Usage
After installing, you’ll find a new menu item in the admin area near the bottom called ‘Coupons’. All administration is done from there.
There are coupons and (coupon) groups.
Each coupon belongs to exactly one group and has a value and expiry date.
A group contains many coupons and defines the template that is shown to the users within a popup. By default, only logged in users can get coupons.
Start by creating a new group. Give it an unique name and write out the template.
There are four buttons in the editor, which mark the speical areas for the popup. Highlight the according text and press the button to mark it up.
Action button: When this button is clicked, the coupon’s value will be fetched from the backend and displayed.
Success area: This area is hidden until the coupon is fetched from the backend.
Coupon value: This area will be replaced with the coupon’s value. Make sure to not include trailing whitespace, otherwise it may look ugly.
Expiry date: This area will be replaced with the coupon’s expiry date. Make sure to not include trailing whitespace, otherwise it may look ugly.
Save the group and add some coupons. You can add multiple coupons with the same expiry date. Just make sure that every coupon gets its own line (empty lines are ignored).
Now you’re ready to go. But you may want to have a look at the default settings. There you can adjust delays between events to not spam your users.
Customization
Most of the user-facing customization can be done in the group editor. If you want to change the users which should be able to get coupons, you can hook into the unique_coupons_user_is_authorized_for_coupons filter. Currently, there is no way to distribute coupons to anonymous users (keeping track is done server-side). So even if you allow this through this filter, it will not work.
Shortcomings/Bugs
For now, data from this plugin will stay around after deleting it.
You can’t explicitly filter when the popup shouldn’t be shown. The best workaround is to hook into unique_coupons_user_is_authorized_for_coupons.
Contributing
The source code is hosted on Josef37/unique-coupons.
Feel free to create a new issue, when you have questions or feature requests, or consider making a pull request.
There is a separate developer README, which helps you set up the development environment.
If this plugin helped you in any way, I’d like to hear your feedback.
