What means customizing within kh_vmoci
With a template, you can determine which data the OCI sends. With simple PHP functions you can also determine the format of data.
The standard template
The standard template is default.tpl.php.
Where are the templates
MyJoomlaInstallation/plugins/system/kh_vmoci/xxxxx.tpl.php
Edit a template.
Open the template default.tpl.php or copy it to a new template and open it.
<form id="kh_vmOciSendForm" action=" <?php echo $hook_url ?>" method="post" target="_top">
standard parameter
<input type="hidden" name="~OkCode" value="ADDI" />
<input type="hidden" name="~target" value="_top" />
<input type="hidden" name="~Caller" value="CTLG" />
<?php
$counter = 1;
foreach( $rows as $row )
{
?>
In the foreach construct, you can determine the data for each product of the order. E.g.
<input type="hidden" name="NEW_ITEM-DESCRIPTION[<?php echo $counter ?>]"
value="<?php echo substr($row->order_item_name,0,40) ?>" />
<input type="hidden" name="NEW_ITEM-QUANTITY[<?php echo $counter ?>]"
value="<?php echo number_format($row->product_quantity, 3, '.', '') ?>" />
<input type="hidden" name=NEW_ITEM-UNIT[<?php echo $counter ?>]"
value="<?php echo substr($row->product_unit,0,3) ?>" />
<input type="hidden" name="NEW_ITEM-PRICE[<?php echo $counter ?>]"
value="<?php echo number_format($row->product_item_price, 3, '.', '') ?>" />
<input type="hidden" name="NEW_ITEM-PRICEUNIT[<?php echo $counter ?>]"
value="1" />
<input type="hidden" name="NEW_ITEM-CURRENCY[<?php echo $counter ?>]"
value="<?php echo $row->order_item_currency ?>" />
More data…..
<?php $counter++; ?>
<?php } //end for ?>
<input type="button" class="button" value="<?php echo $button_text ?>"
id=kh_submitoci name=kh_submitoci onClick="kh_vmocisendform()">
</form>
/* here are all fields */
// from order
$row->order_id;
$row->user_info_id;
$row->vendor_id;
$row->product_id;
$row->order_item_sku;
$row->order_item_name;
$row->product_quantity;
$row->product_item_price;
$row->product_final_price;
$row->order_item_currency;
$row->order_status;
$row->order_item_cdate;
$row->order_item_mdate;
$row->product_attribute;
//from product
$row->product_s_desc;
$row->product_desc;
$row->product_weight;
$row->product_weight_uom;
$row->product_length;
$row->product_width;
$row->product_height;
$row->product_lwh_uom;
$row->product_url;
$row->product_available_date;
$row->product_tax_id;
$row->product_unit;
$row->product_packaging;
Only necessary if different customers want different transmitted data.
Otherwise simply edit default.tpl.php.
If necessary, you can specify a template for each user.
Is no template specified, kh_vmoci use default.tpl.php.
To assign a template to an user, the following steps have to be executed.