Menu Content

VirtueMart nástroje

> Choose one to see more info

VM Invoice Documentation

Abstract

User documentation for VM Invoices & Book it! Invoice Joomla component. Installation and usage instructions.


Chapter 1. Introduction

Table of Contents

1.1. What is VM Invoices

1.1. What is VM Invoices

VM Invoices is a component for Joomla CMS / VirtueMart e-store, that generates PDF invoices for VirtueMart purchases. VM invoices offers a list of orders, where you can generate PDF invoice by one click and download it or send by client by email. Invoices can be sent automatically to shopper emails. An integration with VirtueMart frontend is also possible, so users can download the invoices using the frontend order list.

Core VM Invoices features include:

  • Automatically generates PDF invoices and delivery notes for VirtueMart customers

  • Can send invoices and delivery notes to customers' emails

  • Manual or fully automated operation

  • Configurable invoice numbering with prefixes.

  • Configurable order status, when invoice is generated and sent.

  • Adjustable invoice appearance with custom fields and whole templates.

  • Editing and creating new orders.

Chapter 2. Installing VM Invoices

You can obtain VirtueMart Invoices Generator by purchasing and downloading from ARTIO webpage www.artio.net. Instalation is simple and easy.

2.1. Prerequisites

To continue following this instalation tutorial, first make sure that:

  • you have a running and functional Joomla site

  • you have installed and functional VirtueMart extension.

  • check the write permissions on Joomla directories, see Help ’ System Info ’ Directory permissions

2.2. Installing VirtueMart Invoices Generator

  • log-in to your Joomla! backend with Super Administrator privileges

  • go to Extensions ’ Install/Uninstall

  • select downloaded zip file and confirm button upload&install

  • follow the installer instructions and check for any error

2.2.1. Installation

VirtueMart Invoices Generator installation is fully automated in most cases. It will install:

  • the main VM Invoices component (in components/com_vminvoice and administrator/components/com_vminvoice)

  • language files (in languages)

  • database tables (#__vminvoice_config, #__vminvoice_mailsended, #__vminvoice_additional_field)

  • VM Invoice Autorun system plugin - this sends e-mails in Automatic Mode.

After uninstall, component database (configuratiom, invoice numbers) is kept. You can uninstall and install component without losing that information. Howerver, if you want clear install, remove database tables prefixed with [JoomlaPrefix]_vminvoice_.

Chapter 3. Basic Usage and Configuration

To manage VM Invoices, you need to be loged in Joomla's backend (adminstration). Then navigate to Components ’ ARTIO VM Invoices ’ Control panel

There are 9 tabs available. First one named Control panel is overview with shorcuts to component functions. Next three Global configuration, Invoice configuration and Delivery note configuration are used for various component settings.Fields is for set yours bank and company details, PDF header, PDF footer. Invoice/Order management is main page with orders and invoices list, where you can send and print invoices and edit orders. Create New Order is shortcut for creating new order. Upgrade section provides informaton about new component version and allows you to automatically or manually upgrade component. Support provies shortcuts for sources of help and support for component.

3.1. Global Configuration

This tab does include several options that control how the VM Invoices works as well as buttons to initiate related actions. Any change should be saved by clicking the Save Configuration button located in the right-top corner of the page.

3.1.1. General Config

3.1.1.1. General Config

Operation Mode

You can choose between automatic and manualy sending option.

If you choose the manual option, no emails will be sent or invoices generated unless you launch the particular action.

Note that in autimatic mode, sent are only e-mails for orders modified in last 24 hours.

If you use automatic option, you need to do some more configuration - please read Chaper 4 - 1.

Required Order Status

(only applies to automatic mode)

The order status, that causes PDF invoice to be generated and sent to client. You can select more statuses by clicking with CTRL.

Also, it affects own invocie numbers assigning (New invoice number will be assigned only if order is in desired status)

Mailing Interval

(only applies to automatic mode)

This option allows you to set time interval, when emails with newly generated invoices are being sent. (If using cron, this interval should be same or longer than the one configured in your cron script. See more in Chapter 4 - 1.1.)

Change Currency Sign

If your currency does not generate properly (e.g. when using ¬ sign) you can use this substituon.

Syntax is: original currency string 1 | new currency string 1[, original currency string 2 | new currency string 2, ...]

As a separator between character and name use "|" (pipe) and separator between whole sub.word use "," (comma)

Example : ¬|EUR,$|USD

Date Pattern

Date pattern format for date in invoice can be e.g. (m-d-Y or d.m.Y); use the PHP syntax for date() function. Also you can use syntax of PHP strftime() function. This syntax gives date ability to be translated based on invoice language. However, be sure you check result is valid for all languages your invocies are avilable in, because behavior of function can vary on different servers. If date your language is not supported, ask your server provider to install new "locale" for your specific language. Also be aware that certian characters (like %e) are not available on Windows servers or behave differently.

3.1.1.2. Technical Config

Cache PDF

Invoice PDFs are stored in Joomla! tmp folder in subfolder called "VM Invoice" (in your language) and subfolders divided by year and month. If order was not changed and also was not changed any PDF appearance config, used is previously generated PDF instead of creating new one. If you disable this feature, invoices are created newly every time they are needed. Enabling this feature speeds up performance and also enables you to pre-generate multiple invoices in batch screen.

Use HTML Tidy (if available)

PHP Tidy library is used to fix and sanitise HTML code before using by PDF generating library.

Image Paths

Controls how image paths are generated on invoice HTML. Since there are many various server settings, this feature enables more settings to work on your server.

  • Absolute: http://www.example.com/joomla_site/...path_to_image

  • Relative to domain root: joomla_site/...path_to_image

  • Relative to Joomla! root: ...path_to_image

  • Server path: var/www/html/joomla_site/...path_to_image or c:/wamp/www/joomla_site/...path_to_image

Debug Mode

When switched on, no PDF will be created, you will only see raw HTML output that is used to create PDF. You can also see any PHP warnings. If you are having issues with creating PDF, try enabling this feature.

3.1.1.3. Customer Info Extra Fields

Show Extra Fields Label

Wheater display label before extra fields.

Extra Field 1,2

Here you can define extra fields defined from VirtueMart, which will be displayed under user's address.

3.1.2. Order Editing

Default Vendor

Default vendor for newly created orders from VM Invoice.

Default Currency

Default currency for newly created orders from VM Invoice.

3.1.3. Page Appearance

3.1.3.1. Page Appearance

Use Customer Language

If you specify yes, invoice will be generated in customer's default site language. If user have no language specified or selected No, invoices are generated in site default language.

PDF Font

List of fonts available for PDF generation.

Non-latin languages may use UTF-8 version of the font. The generated PDF however are bigger in size then.

You can upload new .ttf fonts (unicode). Fonts are uploaded into administrator/components/com_vminvoice/libraries/tcpdf/fonts. Program will try to install new *.ttf fonts for using in PDF generation. You will see message "Font was installed" after process. Alternatively, you can upload .php, .z and .ctg.z font files.

Font size

Here you can regulate overall PDF font size.

Margins

PDF margins in milimeters.

3.1.3.2. Header

Show Contact

Wheater show {contact} tag in template.

Show Logo

Wheater show {log} tag with vendor logo in template.

Logo Width

Is showing vendor logo, you can specify it's size in cm. Remember to also adjust template cell to fit bigger or smaller logo (because cells are not expanded automatically)

3.1.3.3. Footer

Show Signature

Wheater show {signature} tag with ARTIO signature.

Show Pagination

Wheater show {pagination} tag in template footer. If you place {pagination} tag into header, it will be shown on one page invoices even if you select 'When more pages'.

Information Fields Position

Where to display (or not) {extra_fields} tag on template. Content is defined in Fields configuration.

Fields Background Color

Background color of {extra_fields} tag

3.1.3.4. Background

Background Image

Background image source.

Image Position

Background image aligment.

Image Offset From Left

Optional left offset of image. Use cm. Page width is 210 cm.

Image Offset From Top

Optional top offset of image. Use cm. Page width is 270 cm.

Stretch to Page

If stretch background image to page.

3.1.4. Mailing Configuration

Use Mailer Info From

Here you can define sender E-mail source.

Send Mail To

Here you can configure recepient of invoice e-mail.

  • Shopper and shopkeeper - Invoice is sent to customer and as copy to e-mail defined in Use Mailer Info From.

  • Shopper only - Invoice is sent only to customer.

  • Shopkeeper only - Invoice is sent only to e-mail defined in Use Mailer Info From.

Sender Email

E-mail displayed as sender. Only used when Use Mailer Info From is set to VM Invoice Configuration.

Sender Name

Name of sender displayed in e-mail. Only iused when Use Mailer Info From is set to VM Invoice Configuration.

E-mail subject and body are defined in Invoice E-mail and Delivery Note E-mail configuration sections.

3.1.5. Registration

VM Invoice Download ID

Enter Download ID you obtained upon component purchase.

Version Checker

When enabled, component will check new version from ARTIO server.

3.2. Invoice Configuration

3.2.1. Invoice Numbering

Invoice Number

You can choose between order or own numbering.

  • If using order numbering, invoice number will be always same as order id created by VirtueMart. There is no need to wait before order enters required state to generate invoice. (However, state still applies for invoice sending).

  • If using own numbering, invoice numbers are created sequentially, independently on order id. New invoice numbers are automatically assigned if order enters Required Order Status defined in General Config. Also, configuration option Starting Order For Numbering applies to it.

Starting Order For Numbering

(only applies to own numbering) Minimal order id for autimatic invoice number assignation. If you are importing old database and don't want to create invoices for old orders, set starting order Id here. If you old orders have already numbers assigned, you can always delete their numbers by "delete created invoices" batch action.

Numbering prefix

(only applies to own numbering) Prefix before invoice number. Can be for example last two digits of year. Setting only affect newly created invoice numbers, for old invoice numbers edit prefix manually or delete invoices and create them again.

Start Invoice Number

(only applies to own numbering) Initial invoice number to start automatic numbering from.

Allow invoice number prefix editing

(only applies to own numbering) If yes, allows manual changing of invoice prefix.

3.2.2. Invoice Configuration

Address Shown

Whater show {billing_address} and {shipping_address} (or both) in template.

Show Address Label

Wheater prepend "Billing Address" and "Shipping Address" label to addresses.

Address Format

Specifies address formatting for {billing_address} and {shipping_address} tags.

Show Invoice Number

Whater show {invoice_number} tag in template.

Show Customer Number / ID

Whater show {customer_number} tag in template.

Show shopper group

Whater show {shopper_group} tag in template.

Show Date Label

Whater display {invoice_date_cpt} tag.

Default Invoice Date

Date that will be defaultly assigned as invoice date. Note that after invoice number is created, Invoice date can be changed only manually.

Show Taxable Payment Date

Whater show {taxable_payment_date} tag in template.

Taxable Payment Dat

Date used as Taxable Payment Date.

Show Maturity Date

Whater show {maturity_date} tag in template.

Maturity (days)

Day offset from Taxable Payment Date.

Show Shipping Date

Whater show {shipping_date} tag in template. Shipping date is last date of changing order status to "Shipped".

Show Payment Type

Whater show {payment_type} tag in template.

Show Variable Symbol

Whater show {variable_symbol} tag in template.

Variable Symbol

What number will be used as variable symbol.

Show Customer Note

Whater show {customer_note} tag in template.

Show Finnish index number

Whater show {finnish_index_number} tag (number used only in Finland) in template.

3.2.3. Invoice Items Configuration

3.2.3.1. Invoice Items Configuration

If is any column hidden in this config section, it is also hidden from invoice template. You don't need to delete that column directly in template.

Repeat Table Header

Whater repeat table header on every page. Note that for this setting work, {items} tag must be placed outside any HTML table.

Show Quantity Unit

Wheater show "pcs" after product quantity. Hides {qty_unit} tag.

Show Product SKU

Wheater show product SKU column. Hides {sku} tag and associated column.

Show Product Attributes

Wheater show product attributes. Hides {attributes} tag.

Show Price Excl. Tax

Wheater show column with products verall price before tax. It hides {price_notax} tag and associated column.

Show Tax Rate

Wheater show column with product % tax rate . It hides {tax_rate} tag and associated column.

Tax Rate Tolerance

Tax rate is not stored directly in orders table. Because of that, it must be "guessed" on invocies by difference between gross and net and using available tax rates in VirtueMart. That guess can be sometimes inaccurate, so this setting defines offset between computed and real tax rate to be properly assigned. Note that other calculations can be still little misfitting because of that, that is due to VirtueMart storing of prices.

Product Tax And Subtotal (only in VM 1.x.x)

VirtueMart 1.x.x stores ordered product prices only as net and gross. Due to Tax Rate Tolerance can be assigned tax misfitting on some point.

  • Taken from VirtueMart (default): Product gross price is taken from order table and tax amount is simply difference between gross and net.

  • Calculated from base and VAT: Product tax amount and gross price will be calculated from net * assigned tax rate. This override gross price stored in order. NOTE: This affect only ordered products subtotals, NOT order total. Order total stays always the same.

Show Tax Value

Wheater show column with products tax amount . It hides {tax_price} tag and associated column.

Show Discount (only in VM 2.x.x)

Wheater show column with products discount. It hides {discount} tag and associated column.

Always Show Currency Unit

By default, currency is shown only at subtotal column. When you enable it, currency is shown at all prices.

Show Shipping Details

If enabled, at shipping row is shown also shipping carrier and rate description. It is inserted on place of {attributes} tag.

Prices Rounding

Manner of prices rounding on invoices.

3.2.3.2. Invoice Totals

Show Tax Summary

Show overview with tax rates and theor amounts. Requied in EU countries.

Show Tax Summary Label

Show "Tax summary" label before tax summary.

Show Subtotal

Show subtotal line. Subtotal line constists of net, tax and gross amounts summed up. Shipping costs are counted in. In VM 2.x.x is counted in also payment costs.

Extended Coupon Discount

If enabled, coupon discount is splitted to row similat to tax summary. You should specify Coupon VAT also. If disabled, coupon discount is displayed as single value.

Coupon VAT (%)

Is using Extended Coupon Discount, specify VAT applied on copon. Note that coupon value is considered as with tax, so coupon tax is substracted from it.

Extended Total Line

If enabled, total line contains also overall net price, overall tax, tax rate (only if order uses single tax for all items), and overall . If disabled, total line contains only overall order price.

3.2.4. Invoice E-mail

Mail Subject

Subject of e-mail with invoice.

Mail Body

Body of e-mail with invoice. You can use special replacable fields in it:

  • [%orderId%] - order Id.

  • [%invoiceId%] - invoice number. Can be different than Order id if using Own numbering.

  • [%firstName%] - customer billing address first name

  • [%secondName%] or [%lastName%] - customer billing address last name

3.2.5. Invoice Template

3.2.5.1. Overview

From version 1.7 you can define exact layout of invoices and delivery notes. Layout is defined as HTML document. It is divided into Header, Body and Footer separated by pagebreak lines. Header and Footer are displayd on top and bottom of every page. You can always turn your template to default by clicking on Restore template back to original button.

Templates uses {xxx} aliases/tags, which are replaced by proper entity.

Fields:

  • You can see list of available tags by clicking on Possible replacement fields link at bottom.

  • { * _cpt} are captions and are usually replaced by some text contants.

  • Configuration options still applies for certain tags. For example, when you set "Show Shopper Group" to "No", tags {shopper_group_cpt} and {shopper_group} are not displayed.

General tips:

  • When you copy & paste something, Joomla! editor (at least TinyMCE) usually copies also format. Usually it wraps content to with specified font and size. Switch to HTML view and clean content or paste directly in HTML mode.

  • When you save template, switch back to WYSIWIG mode. In some editors (tested with TinyMCE), Joomla doesn't save changed content when is in HTML mode.

  • Always use % units. Especially font sizes and table widths. It is because PDF paper has different unit measures. Also, it allows you to globaly change font size using Font Size config setting.

  • TCPDF cannot handle all HTML code and special CSS. Use only basic.

3.2.5.2. Products table

{items} tag s replaced by table of ordered products. Table has always 100% width. (If you want to make it smaller, wrap it to another element with smaller width).

Table header and product row are defined separately at Table Header and Table Row fields. Each fields must have equal number of columns; but "colspan" property is taken into account.

Column widths. If you want to redefine column widths:

  • ALWAYS use percent widths.

  • Edit widths only in Table Header. Widths defined in Table row are not taken into account.

  • You don't have to define width at all columns, but it is recomanded.

  • Overall sum don't have to make 100%. If fields sum make 90% or 120%, they are recomputed afterwards to do 100%.

Table footer rows (shipping, payment, subtotal, tax summary, total) fields are made dynamically from item row by replacing tags by apripriate values.

3.2.5.3. apripSpecial cases

Some adjustments are done to HTML code before making template:

3.2.5.3.1. Emty tags removed with preceding BR and following ":"

If some tag is empty (due to configuration or customer leaves it blank, like for example {billing_address_2}), it is removed also with preceding
and following ":". This is useful for removing blank lines and blank captions: values pairs.

3.2.5.3.2. Columns removed in products table

If some column is removed due to Invoice Items configuration (for example Tax Rate) and column does not contain any other content, whole column is removed from table. Other columns widths are adjusted to fill empty space.

3.2.5.3.3. Labels: values converted to HTML table

If some text in template before follows this pattern "something: something" and it is repeated more times with
s between them, it is converted into

with 100% width and first column of 60% and second in 40%. This is done for better readability. Typically with {field_cpt}: {field} in default template.

3.2.5.3.4. Translations strings

If some text is wrapped inside square brackets, Joomla! JText::_ function is used for translation it's content. By this you can define language dependent strings. Bracket content can be also in format [com_component:Language_String]. In that case will be loaded also com_component language (from frontend, backend and component /language folders)

3.3. Delivery Note Configuration

3.3.1. Delivery Note Configuration

Delivery Notes Enabled

If yes, delivery notes functionality is enabled.

Show Quantity Unit

Wheater show "pcs" after product quantity. Hides {qty_unit} tag.

Show Product SKU

Wheater show product SKU column. Hides {sku} tag and associated column.

Address Shown

Whater show {billing_address} and {shipping_address} (or both) in template.

Show Date Label

Whater display {invoice_date_cpt} tag in template.

Show Customer Note

Whater show {customer_note_cpt} and {customer_note} tags in template.

3.3.2. Delivery Note E-mail

Send With Invoice

If enabled, delivery note is attached with invoice. If disabled, delivery notes have to be sent separately.

Mail Subject

Subject of e-mail with delivery note.

Mail Body

Body of e-mail with invoice. You can use special replacable fields like in Invoice Mail Body.

3.3.3. Delivery Note Template

Here you can define delivery note HTML template. See Invoice tenmplate for more info. Note that {items} table at delivery note is generated without prices footer.

3.4. Fields

Fields is special table replacing on {extra_fields} tag. It is also directed by Information Fields Position config option.

3.4.1. Bank Details

You can include the bank payment details on the invoice. You can enter the following information:

  • Bank name

  • Account number

  • Bank code number

  • BIC / Swift

  • IBAN

Next to each field, you will find an radio button to switch, whether the information is shown or not at the invoice.

3.4.2. Company details

Information about your company that you want to be shown in the invoice.

  • Tax Number

  • VAT ID

  • Registration Court

  • Phone

  • Mail

  • Web Url

PDF Header and PDF footer

Is for your own header and footer in generated pdf file. You can put signature into the footer for example. Also you can use HTML tags. They are placed instead of {start_note} and {end_note} tags.

3.5. Invoices / Order Management

Invoices view provides the list of orders in the system, where you can manage the invoices.

You will see the status, if the invoice has been already sent to client ot not and you have option to (re)sent the invoice to the user manually (via email) or download it as a file.

3.5.1. Filter list

You can use filtering options to quickly locate a specific client or order or tighten conditins for batch action.

3.5.2. Batch actions

Batch actions panel allows you to do actions with multiple orders at once.

Select what orders you would like to process. You have 2 options:

  • Orders checked in list (default) - select orders by selecting them in check box on left side

  • Orders matching filter - processed are all orders matching current filter on left side

Select batch action:

  • Downoad - open invoices or delivery notes all in one PDF. Useful for printing multiple invoices.

  • Send e-mail - sends invoice, delivery note or both (if set "send with invoice" config option) emails. You can select "Also already sent" to force sending even if file was already sent. Otherwise, only unsent files will be sent.

  • Create invoice numbers - (if using own numbering) - forces creating of new invoice numbers, even if orders are not in desired state yet or orders ale below "Starting Order For Numbering" condition.

  • Pre-generate PDFs - generates PDFs to cache. Opening that PDFs after will be much faster.

  • Change status - changes status at multiple orders. You can select if send VirtueMart notify e-mail to customers about state change.

  • Delete created invoices - deletes PDF and order record from VM Invoice. DOES NOT DELETE ORDER (that can be done only in VirtueMart). If using own numbering, this can be used for deleting invoice numbers. But if order is in desired state and not below config setting "Starting Order For Numbering", new invoice number is created right afterwards.

3.5.3. Orders table

Table contains these columns:

  • ID

  • Select box for batch action

  • Order ID

  • Invoice number - by clicking you can change invoice number, if using Own numbering.

  • Edit - here you can edit the order directly

  • Client name

  • Company

  • E-mail

  • Status - here you can update status of order

  • Created

  • Modified

  • Total

  • Invoice sent - information if invoice was sent

  • Delivery note sent (if delivery note us enabled) - information if delivery note was sent

  • Send invoice manually - by clicking you send invoice to client. If is enabled delivery note and selected "Send with invoice", sent is also delivery note.

  • Send delivery note manually (if delivery note us enabled) - by clicking you send delivery note to client

  • Invoice PDF - open invoice PDF. If having green background on mouse over, that means PDF is stored in cache.

  • Delivery note PDF (if delivery note us enabled) - open delivery nore PDF.

3.6. Order editing / New order

VM Invoice allows you to edit current orders as well creating new ones, for example when creating orders by phone.

Click on Edit button in invoices list or select Create New Order from VM Invoice menu.

Design of product edit page can be slightly different when using VirtueMart 1.x or 2.x.

3.6.1. Coupon discount

You can enter Copon Code for order. VirtueMart will be searched for that copon code. If coupon is found, you can click on button to apply coupon discount for order (or you can write coupon discout manually). If coupon is gift-only, you can select of delete that coupon after order saving.

3.6.2. Products list

VirtueMart 2.x has Discount column that defines discount applied on product after tax. Note that discount has to be writed in negative format (with minus on start) and fee in positive format.

VirtueMart product stock is adjusted automatically based on ordered product state.

3.6.3. Adding products

You can new product by typing it's name or SKU to Name field. Select order from AJAX list. You can also add "own" product that is not presented in VirtueMart. Just type it's name and click on + button (do not select product in list).

3.6.4. Product taxes

Product, shipping and payment (in VM2) tax information constsis of two elements.

First is Tax rate select box. Available taxes are taken from VirtueMart and "guessed" based on information stored at order (using Tax rate tolerance defined in config). If no available tax rate match stored tax amount, it is selected "-other-" option. That can happen for example if item uses discount (VM1) or multiple taxes are applied to product (VM2). In that case, Tax amount value is not calculated after clicking "Recompute".

Second is real tax amount. That is value stored in database in VM2 or simply computed by deduction of net price from gross in VM1. If list is recalculated, tax amount is computed from product Net price multiplied by selected Tax rate (if is not selected "-other-").

3.6.5. Customer info

Here you can select customer of this order. You can search for available customer by typing part of customer name, company, city, e-mail or address nickname. List is populated with matched customers and their various shipping addresses in brackets (if they have some). You can select any billing + shipping address that user provides or select "pure" user to set shipping address same as billing.

Order information is filled with clicked user default info. If you select New customer, order will be assigned to new customer that will be created after save.

Note that Order billing and shipping user information is not the same as Default user billing and shipping. If you change some address information and save order, you are prompted if you want to change values also in default user info. If you select yes, default user billing and selected shipping address will updated also. That can be useful if was changed some permanent information (for example when user change his billing address). If changed information is only temporarily for current order, click Storno.

Customer Additional fields (but only these, that have set "Show in shipping form") are presented also.

Chapter 4. Advanced Configuration

4.1. Setting-up Automated Sending of PDF Invoices

To enable automated sending of PDF invoices to customers, you need to add call of a VM Invoices script to a system task lisk. On Linux/Unix systems, this would be mostly cron or crontab, on Windows systems it would be Task Manager.

This is the most effective way, as the new invoices are checked and generated only once in time.

You can however also solve this by installing "VM Invoices plugin", that will make the check for configured invoice generation period on each page hit. This is easier to setup (just by installing the plugin), however less efective, as it needs to make the check with every Joomla load.

4.1.1. Configuring VM Invoices using Cron

4.1.1.1. What is cron?

Cron is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates. It is commonly used to automate system maintenance or administration etc.

4.1.1.2. Where do I find cron?

Cron is driven by a crontab, a configuration file that specifies shell commands to run periodically on a given schedule. The crontab files are stored where the lists of jobs and other instructions to the cron daemon are kept. Users can have their own individual crontab files and often there is a system wide crontab file (usually in /etc or a subdirectory of /etc) which only system administrators can edit.

4.1.1.3. Set a Cron script

Structure of the cron script line.

4.1.1.4. Example of Cron for VM Invoices

The following example will ensure, that the newly confirmed orders will be checked and invoices generated and sent every 20 minutes:

For VM Invoice 2:
*/20 * * * * wget -q -O /dev/null "http://www.yoursite.name/?option=com_vminvoice&task=cronMail&view=vminvoice"

For VM Invoice 3:
*/20 * * * * wget -q -O /dev/null "http://www.yoursite.name/?option=com_vminvoice3&task=cronMail"

4.1.2. Using VM Invoices Plugin

If you cannot use the cron planner (or task manager), you can use the VM Invoices autorun plugin. It is installed by default with VM Invoice component.

You only need to enable it. Go to Extensions ’ Plugin Manager, find VMInvoice Autorun system plugin and publish it.

Plugin will check and automatically send invoices based on Mailing Interval option.

4.2. VirtueMart Frontend integration

4.2.1. Integration with VirtueMart 1.x.x Frontend

If you want to provide your users with possibility to download their PDF invoices from VirtueMart frontend (VM 1.x.x), at the Order list, do the following steps:

  1. locate the file components/com_virtuemart/classes/ps_order.php

  2. Around line 664 (VirtueMart v1.1.4), line 705 (VirtueMart v1.1.5 & v1.1.6), modify the code:

    to

    You may also use your editor's Search function to find the correct line; note it may differ in case you have different VirtueMart version or are using other add-on that modify the original source code.

  3. After line 682 (VirtueMart v1.1.4) or line 723 (VirtueMart v1.1.5 & v1.1.6), add following lines:

    Please note that the line number may differ with different version or when using other add-ons modyfing the VirtueMart source code. The lines preceeding the inserted block should look like:

    so you may use Search function to locate the correct line at your site.

    Modify the 'C' value (line 2) to other order status if you want to show invoice for other than confirmed statuses (this is not done checkted automatically toward VM Invoices setting to keep the VirtueMart integration as simple as possible).

    To use another than PDF icon, modify the image path at the added line 2.

4.2.2. Integration with VirtueMart 2.x.x Frontend (VM Invoice 2)

If you want to provide your users with possibility to download their PDF invoices from VirtueMart frontend (VM 2.x.x) at the Order list, do the following steps:

  1. Locate the file components/com_virtuemart/views/orders/tmpl/list.php

    IMPORTANT: If your template overrides default VirturMart HTML code, you must edit also file located in Joomla root/templates/TEMPLATE_NAME/html/com_virtuemart/views/orders/tmpl/list.php.

    Line numers may differ in that case. Also, adjust HTML code, CSS classess and tags to match template style.

  2. On start of file (right after "defined('_JEXEC') or die('Restricted access');", around line 24) add following code

  3. Line 72 (after previous step is probably around 80) (VirtueMart v2.0.10), add the code. Code must be inserted before "" tag:

    Please note that the line number may differ with different version or when using other add-ons modyfing the VirtueMart source code.

    To use another than PDF icon, modify the image path at the added line 4.

  4. You may also want to add table header around line 55 (before tag)

  5. To add link also for delivery note, add block of code described in step 3 again. Only difference will be link inside

    If integration was not successfull, invoices are not showing (even if they should), and you don't see even new column header, you are probably using template override. In that case, see note at point 1. If you do see header, but not PDF icon, it can be because invoice number is not generated yet (using own numbering and order is not in specified state).

4.2.3. Integration with VirtueMart 2.6.x and 3.0.x Frontend (VM Invoice 3)

If you want to provide your users with possibility to download their PDF invoices from VirtueMart frontend (VM 2.6.x and 3.0.x) at the Order list, do the following steps:

  1. Locate the file components/com_virtuemart/views/orders/tmpl/list.php

    IMPORTANT: If your template overrides default VirturMart HTML code, you must edit also file located in Joomla root/templates/TEMPLATE_NAME/html/com_virtuemart/views/orders/tmpl/list.php.

    Line numers may differ in that case. Also, adjust HTML code, CSS classess and tags to match template style.

  2. On start of file (right after "defined('_JEXEC') or die('Restricted access');", around line 24) add following code

  3. Line 75 (after previous step is probably around 80), add the code. Code must be inserted before "" tag:

    Please note that the line number may differ with different version or when using other add-ons modyfing the VirtueMart source code.

    To use another than PDF icon, modify the image path at the added line 4.

  4. You may also want to add table header around line 52 (before tag)

  5. To add link also for delivery note, add block of code described in step 3 again. Only difference will be link inside

    If integration was not successfull, invoices are not showing (even if they should), and you don't see even new column header, you are probably using template override. In that case, see note at point 1. If you do see header, but not PDF icon, it can be because invoice number is not generated yet (using own numbering and order is not in specified state).

Chapter 5. Book it! Invoice

ARTIO Book it! Invoice is special branch of VM Invoice, that can be used along with ARTIO Book-it. It is separate component with separated database tables.

Settings and possibilities are much the same as at VM Invoice with following differences:

  • No order/reservation editing.

  • No delivery notes.

  • Different default templates.

  • Third setting for Operation Mode. Except first two operation modes (Manual and Automatic, which works much the same as in VM Invoice), here is possibility to Attach to reservation e-mails. With this option, invoices are attached automatically to reservation e-mails sent from Book it!. Important tips to make this functional are:

    • Make sure you have enabled all reservation and status change e-mails in Book it! and filled all recepient e-mails.

    • Enable Booking - Book it! Invoice send plugin, that is installed with Book-it invoice. This plugin is needed to connect Book it! Invoice and Book it! to attach invoices to automatic e-mails.

    • Check Requied Payment Status setting. Invoices will be attached only in if reservation payment meets selected state. You can select more states with holding CTRL.

      For example, if you want to attach invoice to first reservation e-mail, select Unpaid. If you want to attach invoice to e-mail notify after reservation was paid, select Paid and Deposit . (both, because user can skip deposit payment and pay price and deposit at once)

      Note: Invoices will be attached only once. After it, invoice is marked as sent and can be re-sent only manually from invoices list.

    • Check Send Mail To setting. In Attach to reservation e-mails mode, this define if attach invoice to e-mail to customer, admin or both. But it depends on Book it! setting, which e-mail will be really sent.

    • Other e-mail settings (subject, body, recepient) are not taken into account.

  • New config option for Date pattern in Invoice items configuration. This setting modifies displaying of {time}, {time_from} and {time_to} tags representing object reservation time. See config options tooltips.

Přihlášení uživatele Prázdný