hello stuart, to summarize what i did on your site:
- i made all the special Event fields to be part of the BT
- i added support for delimiter usage within your theme by:
-- copying config.xml from the original clean_simple2 theme + delimiter_start + delimiter_end php theme files
-- i enabled and reordered the delimiters so they display properly
-- i disabled the ST section within OPC since the ST should be used for the address and it could cause problems when procesed by payment/shippng plugins when it's missing some of the basic address fields
i modified your invoice pdf + email teamplates so they render the bottom section at the Ship to section. They get cut at "company2" field and these are the modified files:
\templates\YOUR JOOMLA TEMPLATE\html\com_virtuemart\invoice\mail_html_shopperaddresses.php
- Code: Select all
<?php
/**
*
* Layout for the order email
* shows the chosen adresses of the shopper
* taken from the stored order
*
* @package VirtueMart
* @subpackage Order
* @author Max Milbers, Valerie Isaksen
*
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
*
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
?>
<table class="html-email" cellspacing="0" cellpadding="0" border="0" width="100%"> <tr >
<th width="50%">
<?php echo vmText::_('COM_VIRTUEMART_USER_FORM_BILLTO_LBL'); ?>
</th>
<th width="50%" >
<?php echo vmText::_('Event Details'); ?>
</th>
</tr>
<tr>
<td valign="top" width="50%">
<?php
foreach ($this->userfields['fields'] as $field) {
if (!empty($field['value'])) {
if ($field['name'] === 'company2')
{
if (empty($event_html))
$event_html = ' ';
}
if (!empty($field['value'])) {
if (!empty($event_html))
{
ob_start();
?><!-- span class="titles"><?php echo $field['title'] ?></span -->
<span class="values vm2<?php echo '-' . $field['name'] ?>" ><?php echo $field['value'] ?></span>
<?php if ($field['name'] != 'title' and $field['name'] != 'first_name' and $field['name'] != 'middle_name' and $field['name'] != 'zip') { ?>
<br class="clear" />
<?php
}
$z = ob_get_clean();
$event_html .= $z;
}
else
{
?><!-- span class="titles"><?php echo $field['title'] ?></span -->
<span class="values vm2<?php echo '-' . $field['name'] ?>" ><?php echo $field['value'] ?></span>
<?php if ($field['name'] != 'title' and $field['name'] != 'first_name' and $field['name'] != 'middle_name' and $field['name'] != 'zip') { ?>
<br class="clear" />
<?php
}
}
}
}
}
?>
</td>
<td valign="top" width="50%">
<?php
if (!empty($event_html))
{
echo $event_html;
}
if (!empty($this->shipmentfields['fields']))
foreach ($this->shipmentfields['fields'] as $field) {
if (!empty($field['value'])) {
?><!-- span class="titles"><?php echo $field['title'] ?></span -->
<span class="values vm2<?php echo '-' . $field['name'] ?>" ><?php echo $field['value'] ?></span>
<?php if ($field['name'] != 'title' and $field['name'] != 'first_name' and $field['name'] != 'middle_name' and $field['name'] != 'zip') { ?>
<br class="clear" />
<?php
}
}
}
?>
</td>
</tr>
</table>
and invoice file:
\templates\YOUR JOOMLA TEMPLATE\html\com_virtuemart\invoice\invoice_order.php
- Code: Select all
<?php
/**
*
* Order detail view
*
* @package VirtueMart
* @subpackage Orders
* @author Oscar van Eijk, Valerie Isaksen
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: details_order.php 5341 2012-01-31 07:43:24Z alatak $
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
?>
<?php
if ($this->doctype == 'invoice') {
if ($this->invoiceNumber) { ?>
<h1><?php echo vmText::_('COM_VIRTUEMART_INVOICE').' '.$this->invoiceNumber; ?> </h1>
<?php }
} elseif ($this->doctype == 'deliverynote') { ?>
<h1><?php echo vmText::_('COM_VIRTUEMART_DELIVERYNOTE'); ?> </h1>
<?php } elseif ($this->doctype == 'confirmation') { ?>
<h1><?php echo vmText::_('COM_VIRTUEMART_CONFIRMATION'); ?> </h1>
<?php } ?>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<?php if ($this->invoiceNumber) { ?>
<tr>
<td class=""><?php echo vmText::_('COM_VIRTUEMART_INVOICE_DATE') ?></td>
<td align="left"><?php echo vmJsApi::date($this->invoiceDate, 'LC4', true); ?></td>
</tr>
<?php } ?>
<?php if (!empty($this->orderDetails['details']['BT']->delivery_date)) { ?>
<tr>
<td class=""><?php echo vmText::_('COM_VIRTUEMART_DELIVERY_DATE') ?></td>
<td align="left"><?php echo $this->orderDetails['details']['BT']->delivery_date ?></td>
</tr>
<?php } ?>
<tr>
<td ><?php echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_PO_NUMBER') ?></td>
<td align="left"><strong>
<?php echo $this->orderDetails['details']['BT']->order_number; ?>
</strong>
</td>
</tr>
<tr>
<td class=""><?php echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_PO_DATE') ?></td>
<td align="left"><?php echo vmJsApi::date($this->orderDetails['details']['BT']->created_on, 'LC4', true); ?></td>
</tr>
<tr>
<td class=""><?php echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_PO_STATUS') ?></td>
<td align="left"><?php echo $this->orderstatuses[$this->orderDetails['details']['BT']->order_status]; ?></td>
</tr>
<tr>
<td class=""><?php echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_SHIPMENT_LBL') ?></td>
<td align="left"><?php
echo $this->orderDetails['shipmentName'];
?></td>
</tr>
<tr>
<td class=""><?php echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_PAYMENT_LBL') ?></td>
<td align="left"><?php echo $this->orderDetails['paymentName']; ?>
</td>
</tr>
<?php if ($this->orderDetails['details']['BT']->customer_note) { ?>
<tr>
<td><?php echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_CUSTOMER_NOTE') ?></td>
<td valign="top" align="left" width="50%"><?php echo $this->orderDetails['details']['BT']->customer_note; ?></td>
</tr>
<?php } ?>
<?php if ($this->doctype == 'invoice') { ?>
<tr>
<td class="orders-key"><strong><?php echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_TOTAL') ?></strong></td>
<td class="orders-key" align="left"><strong><?php echo $this->currency->priceDisplay($this->orderDetails['details']['BT']->order_total,$this->currency); ?></strong></td>
</tr>
<?php } ?>
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td valign="top"><strong>
<?php echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_BILL_TO_LBL') ?></strong> <br/>
<table border="0"><?php
$event_html = '';
foreach ($this->userfields['fields'] as $field) {
if ($field['name'] === 'company2')
{
if (empty($event_html))
$event_html = ' ';
}
if (!empty($field['value'])) {
if (!empty($event_html))
{
$event_html .= '<tr><td class="key">' . $field['title'] . '</td>'
. '<td>' . $field['value'] . '</td></tr>';
}
else
{
echo '<tr><td class="key">' . $field['title'] . '</td>'
. '<td>' . $field['value'] . '</td></tr>';
}
}
}
?></table>
</td>
<td valign="top" ><strong>
<?php echo vmText::_('Event Details') ?></strong><br/>
<table border="0"><?php
if (!empty($event_html)) echo $event_html;
if (!empty($this->shipmentfields['fields']))
{
?><strong>
<?php echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_SHIP_TO_LBL') ?></strong><br/>
<?php
foreach ($this->shipmentfields['fields'] as $field) {
if (!empty($field['value'])) {
echo '<tr><td class="key">' . $field['title'] . '</td>'
. '<td>' . $field['value'] . '</td></tr>';
}
}
}
?></table>
</td>
</tr>
</table>
best regards, stan