教你創建virtuemart invoice收據 發票

原文地址,也是自己原創的,只不過先發布在自己的站上了:http://www.365joomla.com/Joomla%E6%89%A9%E5%B1%95%E4%B8%8B%E8%BD%BD/virtuemart-invoice.html

 

VirtueMart Invoice, Delivery Note and Receipt Addon (VM IDnR Addon)

(英文水平有限,翻譯不對的地方請指出,您的支持是對我最大的安慰,先奉獻上下載地址,你也可以根據下面的正文內容進行單個下載)

virtuemart invoice在1.1.6測試通過

virtuemart invoice在1.1.6測試通過,用戶可以下載invoice,發送invoice給用戶,這裏教你一個不要錢的方法配置成功

壓縮包包含了下文提到的所有(除了virtuemart)安裝程序

   2011-02-26   Joomla 1.5  1.49 MB 0

VM IDnR addon is a "package" of components, plugins and small hacks which allow creating PDF Invoice, PDF Delivery Note, PDF Receipt and sending them through email to customers (Email feauture is available for users who are regularly active in Phoca Forum, are regularly translating Phoca Extensions or have donated to Phoca Project - get more info about how to contribute and get the Email feature on info[at]phoca[dot]cz).

這段就自己看吧,主要是介紹的是神馬東東

Features(特點):

  • Creating Delivery (Partial delivery possible)
  • Creating PDF of Invoice, Delivery Note or Receipt  創建pdf格式的invoice,提貨單或者收據
  • Sending PDF of Invoice, Delivery Note or Receipt through emal to customers (Phoca PDF VirtueMart Email plugin)通過郵件將invoice,提貨單或者收據發給客戶(Phoca PDF VirtueMart Email plugin)
  • Displaying PDF of Invoice, Delivery Note or Receipt in frontend in Account Maintenance (VirtueMart hack needed)在用戶首頁賬戶管理可以顯示invoice,提貨單或者手機(需要將virtuemart hack掉)
  • Creating Delivery, PDF of Invoice, Delivery Note or Receipt, sending them through the email - all automatically after changing order status (Phoca PDF VirtueMart Email plugin, VirtueMart hack needed)在修改訂單狀態後全部自動通過郵件將提貨單,invoice,收據發送給客戶(需要Phoca PDF VirtueMart Email plugin,將virtuemart hack掉)
  • Changing the PDF output in parameters (Changing header, footer height, fonts, etc.)自定義pdf輸出參數
  • Changing the PDF output with help of CSS styles in parameters  自定義pdf css樣式輸出參數
  • Changing the PDF output easily in PDF templates (With help of HTML or CSS)很容易修改pdf模板
  • Changing the Email output (Email template) in parameters (Phoca PDF VirtueMart Email plugin) 根據參數修改email模板
  • Setting default values for creating Invoice, Delivery Note or Receipt in parameters (Phoca PDF VirtueMart Email plugin)根據默認參數生成invoice,提貨單或者收據
  • Product attributes are displayed in PDF document  產品相關屬性都顯示在pdf文件中
  • Additional information like Bank Account Nr., VAT, etc. can be added in parameters (e.g. to header or footer area)附加信息,例如銀行信息等

    vm-invoice

 

Basic requirements(安裝需求):

  • Joomla! 1.5 (tested on 1.5.21)
  • VirtueMart (tested on 1.1.5)

Installation(安裝)

1. Install Phoca PDF component (1.0.8 or later version, Phoca PDF component download link) in Joomla! Extension Manager. It is good to test, if you are able to create PDF documents on your site (e.g. with help of Phoca PDF Content plugin).

第一步:安裝Phoca PDF component    組件(點擊該鏈接下載Phoca PDF component download ).很容易進行測試。可以在您的站上創建pdf文檔

2. Install Phoca PDF VirtueMart plugin (or Phoca PDF VirtueMart Email plugin) in Joomla! Extension Manager. Enable this plugin in Joomla! Plugin Manager (Phoca PDF VirtueMart plugin download site).

第二步:安裝Phoca PDF VirtueMart plugin,點擊該鏈接下載Phoca PDF VirtueMart plugin download

3. Install Phoca Install - VirtueMart component (Phoca Install - VirtueMart component download link) in Joomla! Extension Manager. Check "Ignore SQL query" in case, on your site there is installed previously version of VM IDnR addon (to not lose data). Before you install files and data with help of this component, VirtueMart must allready be installed on your site.

第三步:安裝Phoca Install和VirtueMart組件(點擊鏈接下載 Phoca Install - VirtueMart component download ).如果你的站已經安裝該virtuemart插件,選擇"Ignore SQL query" 。在安裝之前,必須保障virtuemart已經在您的站上安裝好了

(4). If you are using Phoca PDF VirtueMart Email plugin, install Phoca Email Component (it must be installed before making following modifications - Phoca Email component download link).

第四步:在做下面的基本修改之前,必須保證Phoca PDF VirtueMart Email插件已經安裝,Phoca Email Component 已經安裝

Basic Modification(基本的修改)

1. Displaying Delivery tab in detail of an order  在訂單詳情頁顯示Deliver標籤

Modify the following file:   修改一下文件

administrator/components/com_virtuemart/html/order.order_print.php

FROM (line cca 191):從第199行開始將以下代碼


TO:改成



Now the basic addon is installed. Go to "Order List" in your VirtueMart and click on some order (to edit it). Now the "Delivery" tab will be displayed in detail of an order.

現在基本的插件已經安裝好了。現在點擊"Order List"  並且查看具體的訂單信息。現在你可以看到"Delivery"標籤已經顯示在訂單詳情裏面了

vm-delivery-tab

If you click on "New delivery" button, you will be able to create new delivery.

vm-create-delivery

You can create Invoice or Receipt. Delivery Note will be created automatically. After saving delivery, you will be able to display Invoice or Receipt and Delivery Note as PDF.

你可以創建invoice或者收據。提貨單將被自動創建。在保存了提貨單以後,invoice或者收據等就可以以pdf文檔的形式顯示了

vm-delivery-pdf-email

If you are using Phoca PDF VirtueMart Email plugin , you can send emails to your customers.

如果你使用Phoca PDF VirtueMart Email插件,你就可以給您的客戶發送郵件

vm-send-email

Advanced Modifications (Phoca PDF VirtueMart plugin)高級選項修改(Phoca PDF VirtueMart插件)

1. Displaying Invoice, Delivery Note or Receipt in frontend, in Account Maintenance   在賬戶管理頁面,顯示invoice,提貨單或者收據

Modify the following file修改一下文件:

administrator/components/com_virtuemart/classes/ps_order.php

FROM (line cca 23)從第23行將一下代碼



TO修改成以下代碼 :



FROM (line cca 729):從第729行將以下代碼



TO:修改成以下代碼



Then your customers will see PDF icon to Invoice, Delivery Note or Receipt (if created) in Account Maintenance view.

然後您的客戶在賬戶管理頁面就可以看到invoice,提貨單,收據的圖標,如下圖所示

vm-deliver-account-maintenance

2. Fixing tab bug in detail window of an order (if you click on e.g. "New delivery" in delivery tab, the site is redirecting but not the delivery tab will be displayed - the first tab is displayed instead). The site should be redirecting back to delivery tab

在訂單詳情頁修復標籤bug(例如在deliver標籤 點擊 "New delivery",網站跳轉但是deliver標籤沒有顯示,第一個標籤反而顯示了)。網站按道理應該跳轉到deliver標籤頁

Modify the following file修改一下文件:

administrator/components/com_virtuemart/classes/htmlTools.class.php

FROM (line cca 407):從第407行將一下代碼



TO修改成一下代碼 :



FROM: (line cca 421):從第421行開始將一下代碼

TO修改成一下代碼 :



Advanced Modifications (Phoca PDF VirtueMart Email plugin)      高級選項修改(Phoca PDF VirtueMart Email插件)

1. Creating Delivery, Creating PDF of Invoice, Delivery Note or Receipt, Sending email with the Invoice, Delivery Note or Receipt automatically after changing Order status

在修改了訂單狀態以後,創建invoice,提貨單或者收據,並將它們自動發送給客戶

E.g. if you will change the order status from pending to confirmed , then the delivery will be automatically created, PDF document (Invoice, Delivery Note or Receipt) will be created and sent through email to customer.

例如:例如將訂單的狀態由pending 修改成 confirmed狀態,然後系統會自動創建pdf文檔(invoice,提貨單或者收據)並且通過郵件發送給客戶

Modify修改:

administrator/components/com_virtuemart/classes/ps_order.php,

If you didn't do with some previous hack, then you should paste the following code如果之前你沒有做過如何的修改的話,你需要複製一下代碼:

FROM (line cca 23)從第23行起將一下代碼



TO修改成如下代碼 :



and then然後 :

FROM (line cca 281):從第281行開始將一下代碼



TO修改成一下代碼 :



vm-change-status

PDF templates are created in HTML and CSS so they can be stylized in Phoca PDF VirtueMart (Email) plugin parameters or they can be modified directly in template files which are located in the follwing folder:

你可以通過修改Phoca PDF VirtueMart (Email)插件參數來達到修改pdf模板的目的 或者是直接到模板文件所在文件夾修改模板文件。

plugins/phocapdf/virtuemart/ (in your Joomla! site root folder)如下幾個文件

  • tmpl.deliverynote.php
  • tmpl.invoice.php
  • tmpl.receipt.php

vm-plugin-params-site

You can set default settings for creating of a delivery:可以設置默認值來創建delivery

  • If receipt or invoice will be created
  • Due days
  • Delay interest

vm-plugin-params-email

Example of styled Invoice (CSS attributes and header changed in Phoca PDF VirtueMart plugin parameters - no edit in PDF templates):下面是一個例子的截圖

vm-invoice-styled

warning

Translation:

All language strings follows Joomla! translation rules and can be found in:語言文件

  • Phoca PDF VirtueMart plugin (Phoca PDF VirtueMart Email plugin) - en-GB.plg_phocapdf_virtuemart.ini
  • Phoca PDF component - en-GB.com_phocapdf.ini
  • Phoca Email component - en-GB.com_phocaemail.ini

Translation files can be translated to other languages and used on Joomla! site. See article: How to create translation for Joomla! extensions    你可以根據您的站點語言來創建語言文件。點擊How to create translation for Joomla! extensions 查看如何創建語言文件

Phoca Install VirtueMart component is specific file needed for installation only (designed for developers or administrators), so it does not include translation (it is only in English available).

Phoca Install VirtueMart組件安裝過程比較特殊(爲開發人員或者超級管理員設計的),所以不包含翻譯(只有英文的)

引用自:http://www.phoca.cz/documents/18-virtuemart/399-virtuemart-invoice-delivery-note-and-receipt-addon

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章