Finalize Order plugin

Let your customers finalize or cancel a pending order
Extension specs
  • 25
  • vm2.0
  • language
  • plugin

Since Virtuemart 2.0, a pending order cannot be finalized as it used to be in Virtuemart 1.1.x

With this plugin, your customers will be able to finalize or cancel an order that was left pending and won't need to order the same products again.

Combine it with the free Pending order module for even better user experience ! 

 

settings
order_detail

  • 2013-02-28 1.1.2

    - Plugin now updates the order with the newly selected payment method

  • 2013-02-03 1.1.1

    - Changed editor type field to text area to prevent issues

  • 2013-01-30 1.1.0

    - Added option to cancel a pending order

  • 2013-01-29 1.0.0

    - Initial release

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 (|)
Here is a list of parameters you can override:
parameterTypeDescription
filterorderstates order state Enter the order states to display (P, X, C...)
showtos 0/1 Show/hide Accept Terms of Service button 
divclass text a class name to apply to the container div
divstyle text css style to apply to the container div
pretext text text to be shown before the button
text text the text of the button
posttext text text to be shown after the button
class_sfx text class name to apply to the button
btnstyle text css style to apply to the button
showcancel 0/1 Should the user cart be reset before adding the items?
canceltext text text of the cancel button
cancelclass_sfx text a class name to be applied on the cancel button
cancelbtnstyle text css 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:

Virtuemart 2.x

Virtuemart 2.x now follows Joomla's MVC structure. Therefore you can overload template file without changing the core files.
  1.  Locate file
    /components/com_virtuemart/views/orders/tmpl/list.php
  2. Copy it to (recreate folder structure if necessary) 
    /templates/YOUR_TEMPLATE/html/com_virtuemart/orders/list.php 
  3. Add an empty column header to the table
  4. Add the button in a new cell for each records:
    <td>{finalizeorder orderid=&lt;?php echo $row-&gt;order_number; ?&gt;}</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 
    /administrator/components/com_virtuemart/classes/ps_order.php
  2. Locate the function
        function list_order($order_status='A', $secure=0 )
  3. Add the following code to the "while" loop 
    <td>{finalizeorder orderid=&lt;?php echo $db-&gt;f("order_id"); ?&gt;}</td>