Help - Finalize Order Plugin

By default, Finalize order plugin will add a button on the order details page only but cal also parse some custom tags that you can add to articles, modules, or even templates files.
To insert a button in an article or a module, add the following code :
{finalizeorder orderid=XXXX}
//Where XXXX is the order number you want to clone.
You can also override the default plugin settings:
{finalizeorder orderid=XXXX|filterorderstates=P|text=Finalize this}
Separate the different parameters with a pipe (|)
Note that if the orderid parameter is not present but the order_number parameter will be considered.
Here is a list of parameters you can override:
layout (new)textEnter the name of the layout file (without .php)
filterorderstatesorder stateEnter the order states to display (P, X, C...)
showtos0/1Show/hide Accept Terms of Service button 
divclasstexta class name to apply to the container div
divstyletextcss style to apply to the container div
pretexttexttext to be shown before the button
texttextthe text of the button
posttexttexttext to be shown after the button
class_sfxtextclass name to apply to the button
btnstyletextcss style to apply to the button
showcancel0/1Should the user cart be reset before adding the items?
canceltexttexttext of the cancel button
cancelclass_sfxtexta class name to be applied on the cancel button
cancelbtnstyletextcss style to be applied on the cancel button


If you want to get a button in the order list you will need to make some changes manually:

Joomla 3.x & Virtuemart 3.x

Since Joomla 3.x you can create template overrides directly from the Joomla template manager and you don't need to access your files by ftp.
  1. Go to Joomla template manager (Extensions > Templates)
  2. In the left menu, select 'templates' again
  3. Locate your template and click on the link YOUR_TEMPLATE Details and files
  4. Go to Create Overrides tab and click on com_virtuemart and then orders
  5. Templates overrides were created. You can now edit them from the editor tab > html > com_virtuemart > orders > list.php
  6. Add an empty column header to the table
  7. Add the button in a new cell for each records:
    <td>{finalizeorder orderid=<?php echo $row->order_number; ?>}</td>

Virtuemart 2.x / 3.x

Since Virtuemart 2.x code now follows Joomla's MVC structure. Therefore you can overload template file without changing the core files.
  1. Locate file
  2. Copy it to (recreate folder structure if necessary) 
  3. Add an empty column header to the table
  4. Add the button in a new cell for each records:
    <td>{finalizeorder orderid=<?php echo $row->order_number; ?>}</td>

Virtuemart 1.1.x 

it needs a small hack in Virtuemart 1.1.x as the code generating this list is not templated.
  1. Locate the file 
  2. Locate the function
        function list_order($order_status='A', $secure=0 )
  3. Add the following code to the "while" loop 
    <td>{finalizeorder orderid=<?php echo $db->f("order_id"); ?>}</td>

 Template Override

You can override the payment form template like any other component that follows Joomla MVC Coding standard.
To do so, follow the instructions below:

  1. locate the files /plugins/system/vmfinalizeorder/tmpl/form.php and form-vm3.php
  2. Copy them to the folder /templates/YOUR_TEMPLATE/html/system/vmfinalizeorder/
    Where YOUR_TEMPLATE is the name of your Joomla template. You may have to recreate the folder structure.
  3. Modify the newly copied files to your convenience.
  4. You can also create additional templates of your own

Do not modify the original files or you'd loose your changes when updating the plugin.

Matukio - Event Management, Booking and Payment Processing.