[WordPress] 外掛分享: WooCommerce Last Purchased

WordPress 外掛 WooCommerce Last Purchased 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「WooCommerce Last Purchased」是 2015-07-27 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2015-11-24,距離現在已有 3452 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
  • 有 1 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

dawidurbanski |

外掛標籤

woocommerce |

內容簡介

這個小型的 WooCommerce 外掛會在單一產品頁面上顯示最近的購買日期。它會顯示任何人最後一次購買的日期,而不僅僅是當前使用者。如果目前產品尚未銷售,彈出視窗將不會出現。

為什麼我要向我的客戶顯示這個呢?根據我的經驗,顯示最後一次購買日期可以提高轉換率。這個技巧被 Allegro 使用,Allegro 是波蘭最大的拍賣和銷售網站。

基本使用方式:只需安裝外掛,即可立即使用。

如果你想在你的主題檔案中顯示最近的購買日期(並在需要時隱藏彈出視窗),沒問題:

第一種方法:使用 WooCommerce 鉤子,在你的 function.php 檔案中貼上以下代碼:

function show_last_purchased_date(){

if ( WLP()->last_purchased_date() ){
echo '' . WLP()->last_purchased_text()
. ': ' . WLP()->last_purchased_date() . '';
}

}
add_action('woocommerce_product_meta_end', 'show_last_purchased_date');

有關 WooCommerce 鉤子的更多信息,請訪問 WooCommerce 文件。

第二種方法:覆蓋 WooCommerce 模板。你可以通過覆蓋 WooCommerce 模板來實現完全相同的結果。

你需要覆蓋 WooCommerce 模板之一。在這種情況下,我們將此信息放在「添加到購物車」按鈕和 SKU 之後。

有關此信息,請訪問 WooCommerce 文件。

方法如下:

1.進入你的 WooCommerce 外掛目錄。

2.進入範本目錄。

3.進入單一產品目錄。

4.將 meta.php 檔案複製到你的主題目錄/woocommerce/single-product/ 中。

5.如果沒有此目錄,請創建它。

現在在 `` 之前添加以下代碼:

:

如果你不想顯示彈出視窗,請添加以下代碼:

function hide_wlp_popup(){

WLP()->hide_popup = true;

}
add_action('before_wlp_init', 'hide_wlp_popup');

樣式可覆寫,只需在你的主題 style.css 檔案中添加你的規則。以下是幾個示例:

將彈出視窗顯示在左下角而不是右下角:

.wlp-popup{
left: 15px;
right: auto;
margin-right: 15px;
}

改變背景和文字顏色:

.wlp-popup{
background: rgba(98,233,219,0.9);
color:#0b413b;
}

去掉圓角,背景不透明,無 X 按鈕:

.wlp-popup{
background: #76234c;
border-radius: 0;
}

.wlp-popup-close{
display:none;
}

版本歷史:

1.0.1 - 彈出視窗未出現的問題已修復。

1.0 - 初始版本。

翻譯由沃能佳提供。

原文外掛簡介

This little WooCommerce plugin shows last purchased date on single product page. It shows last purchase date made by anyone, not just current user. If current product has no sales yet, popup will not appear.
Why would I show this to my customers?
From my experience, showing last purchased date can increase conversion rate. This trick is using by Allegro (www.allegro.pl), biggest auction and sales website in Poland.
Basic usage
Just install plugin and you are ready to go.
Using just date in your theme (and hide popup if needed)
So you want to get last purchased date somewhere in your theme files? No problem.
First way: using WooCommerce hooks
In you function.php file paste below code.
function show_last_purchased_date(){

if ( WLP()->last_purchased_date() ){
echo '

' . WLP()->last_purchased_text()
. ': ' . WLP()->last_purchased_date() . '

';
}

}
add_action('woocommerce_product_meta_end', 'show_last_purchased_date');

For more information about WooCommerce hooks, please visit WooCommerce documentation.
Second way: override WooCommerce template
You can achieve exact same result by overriding WooCommerce templates.
You will need to override one of WooCommerce templates. In this case we will put this information right after Add to cart button and SKU.
For more information about this, please visit WooCommerce documentation.

Go to your woocommerce plugin directory.
Go to templates directory.
Go to single-product.
Copy meta.php file to ‘your_theme_directory/woocommerce/single-product/’.
If you don’t have such directory, create it.

Now add below code just before
last_purchased_date() ): ?>

last_purchased_text(); ?>:
last_purchased_date(); ?>

Don’t show popup
In your functions.php:
function hide_wlp_popup(){

WLP()->hide_popup = true;

}
add_action('before_wlp_init', 'hide_wlp_popup');

Styling
You can override popup styles. Just place your rules in your theme style.css file. Couple examples below.
Display popup in bottom left corner instead of bottom right
.wlp-popup{

left: 15px;
right: auto;
margin-right: 15px;

}

Change background and text color
.wlp-popup{

background: rgba(98,233,219,0.9);
color:#0b413b;

}

Remove rounded corners, non-transparent background, no X button
.wlp-popup{

background: #76234c;
border-radius: 0;

}

.wlp-popup-close{

display:none;

}

Version history
1.0.1 – Popup not appearing bug fixed
1.0 – Initial version
Translations
This plugin is translation ready. You can help by translating this plugin into your language. All languages are stored in languages directory.
`Time ago` text translation.
This plugin uses timeago.js jQuery plugin. This plugin is also ready for translations. You can find all available languages here. If your language is not available in timeago.js plugin, you will need to create such translation as well.
TODO List
This plugin is free, and I have got limited time. However I will try to implement following features in near future:

Add options to WordPress admin area:

show/hide close button,
popup appear settings,
custom css field,

Ability to override popup html to your own.

License
This plugin is released under GPLv2 license. This plugins is free to use both in personal and commercial usage. It’s distributed “as is”, and no support from the author is provided.
Special thanks
Special thanks to Ryan McGeary (http://ryan.mcgeary.org), author of timeago.js, jQuery plugin used in this little project.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WooCommerce Last Purchased」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0 | 1.0.1 | trunk |

延伸相關外掛(你可能也想知道)

  • Google for WooCommerce 》, Google Listings & Ads可讓您輕鬆地向Google平台上的購物者展示您的產品。無論您是數位廣告的新手還是市場營銷專家,您都可以通過免費和廣告來擴大您的...。
  • WooCommerce Shipping & Tax 》WooCommerce Shipping & Tax 外掛可讓基本的電子商務功能如運送更加可靠,并減輕了您的網站基礎架構壓力。, 使用 WooCommerce Shipping & Tax 外掛,...。
  • WooCommerce PayPal Payments 》PayPal 最新、功能最完備的付款處理解決方案。除了接受 PayPal 獨有的付款方式,也可接受信用卡/借記卡和本地付款方式。開啟 PayPal 付款選項或處理完整的付...。
  • WooCommerce Legacy REST API 》總結:, - 在WooCommerce 9.0版本起,Legacy REST API將不再是WooCommerce的一部分。, - 這款外掛程式在WooCommerce 9.0及以後版本中還原了已移除的Legacy RE...。
  • WP Crontrol 》WP Crontrol 可以讓您查看和控制 WP-Cron 系統中正在發生的事件。從管理界面,您可以:, , 查看所有的 Cron 事件以及它們的參數、循環間隔時間、回撥函數以及...。
  • PDF Invoices & Packing Slips for WooCommerce 》這個 WooCommerce 外掛可以自動為您的客戶在訂單確認電子郵件中添加 PDF 發票。包括一個基本模板(額外的模板可從 WP Overnight 購買),以及修改/建立自己的...。
  • Variation Swatches for WooCommerce 》為 WooCommerce 產品屬性打造美麗的顏色、圖片和按鈕變化的樣式, 如何安裝 WooCommerce 變化樣式外掛程式升級可變產品, , 變化樣式是易於使用的 WooCommerce ...。
  • WooCommerce Cart Abandonment Recovery 》現在是時候停止購物車放棄行為,並找回您失去的收入了!, 研究顯示,約有60%至80%的使用者前往結帳頁面,但沒有完成購買。即使最佳優化的結帳流程也有20%的...。
  • Pinterest for WooCommerce 》Pinterest 提供人們下一個偉大的想法。它部分收藏品,部分市場,是數百萬個分享者獲取靈感、新產品和新可能性的一站式購物平台。它就像一個視覺搜尋引擎,引...。
  • Google Analytics for WooCommerce 》這個外掛提供了 Google Analytics 與 WooCommerce 外掛之間的整合,您可以將推薦連結與購買關聯,並將交易資訊新增到您的 Google Analytics 資料中。它還支援...。
  • User Switching 》這個外掛可讓您輕鬆在 WordPress 中點擊按鈕即可快速切換使用者帳戶。您會立即登出並切換成所需使用者。這對於測試環境、協助 WooCommerce 網站上的客戶或任...。
  • WooCommerce Checkout & Funnel Builder by CartFlows 》#1 WooCommerce 結帳 & 漏斗建置外掛 – CartFlows, ★★★★★, 相較於其他所有的 WooCommerce 結帳選項,更多 WooCommerce 商店店主都選擇了 CartFlows。為什麼呢...。
  • FiboSearch – Ajax Search for WooCommerce 》這是最受歡迎的 WooCommerce 產品搜尋外掛。它為您的用戶提供了一個設計良好的 AJAX 高級搜尋條和即時搜尋建議。, 預設情況下,WooCommerce 提供了一個非常簡...。
  • YITH WooCommerce Quick View 》有時半途而廢是最好的:如果你正在檢視產品列表,但其圖片仍然太小,需要打開該產品頁面,等待載入,最後才能觀察你感興趣的項目。, 因此,為什麼不使用一種...。
  • Custom Product Tabs for WooCommerce 》此外掛擴充了 WooCommerce 功能,允許商店擁有者針對產品添加自訂選項卡。這些選項卡顯示在每個產品頁面上,出現在預設的「描述」選項卡右側。, 個別產品選項...。

文章
Filter
Apply Filters
Mastodon