Help - Clone Order Plugin

By default, Clone 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 event templates files.
 
To insert a button in an article or a module, add the following code :
{cloneorder orderid=XXXX}
//Where XXXX is the order number you want to clone.
You can also override the default plugin settings:
{cloneorder orderid=XXXX|coupon_code=YYYY|text=renew}
Separate the different parameters with a pipe (|)
Here is a list of parameters you can override:
parameterTypeDefaultDescription
divclasstextcloneordera class name to apply to the container div
divstyletext css style to apply to the container div
pretexttext text to be shown before the button
texttextVMCLONE_DEFAULT_TEXTthe text of the button. Enter a language constant to translate the button
posttexttext text to be shown after the button
class_sfxtext class name to apply to the button
btnstyletext css style to apply to the button
button_modeform/linkformform: Displays a form to clone the order
link: Will display a link instead. Use this if you happen to have forms into forms issue 
reset_cart0/10Should the user cart be reset before adding the items?
reset_qty0/10Should the product quantities be reset to 1?
coupon_codetext Valid coupon code to apply to the cart.

 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>{cloneorder orderid=<?php echo $row->order_number; ?>}</td>

Do the same with the order list displayed in the user detail page:

  1. Locate file
    /components/com_virtuemart/views/user/tmpl/edit_orderlist.php
  2. Copy it to (recreate folder structure if necessary) 
    /templates/YOUR_TEMPLATE/html/com_virtuemart/user/edit_orderlist.php 
  3. Add an empty column header to the table
  4. Add the button in a new cell for each records:
    <td>{cloneorder orderid=<?php echo $row->order_number; ?>}</td>

On the order detail page, the plugin should attach itself to the order header table. However if your template rewrites this code or you want to place it in a different place, you can modify the order detail template file and place the code below:

  1. Locate file
    /components/com_virtuemart/views/user/tmpl/detail.php
  2. Copy it to (recreate folder structure if necessary) 
    /templates/YOUR_TEMPLATE/html/com_virtuemart/user/detail.php 
  3. Add the button where you want: 
    {cloneorder orderid=XXXX|coupon_code=YYYY|text=renew}
    
    0

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 
    {cloneorder orderid=XXXX|coupon_code=YYYY|text=renew}
    
    1
  2. Locate the function
    {cloneorder orderid=XXXX|coupon_code=YYYY|text=renew}
    
    2
  3. Add the following code to the "while" loop 
    {cloneorder orderid=XXXX|coupon_code=YYYY|text=renew}
    
    3

 

CMigrator - migrate Wordpress & Drupal websites to Joomla! with ease!
Top