News:

Looking for documentation? Take a look on our wiki

Main Menu

Email Footer Modification

Started by txkeyboards, June 10, 2019, 00:47:06 AM

Previous topic - Next topic

txkeyboards

Hi all,

I would love to change my html invoice footer since right now it is showing:

"Thank you for purchasing at 'shop name' (with a broken URL because it redirects to shopurl.com/index.php?option=com_virtuemart)
'shop name'
'shop name'"

Here are the codes that I found that I think I should change:

Quote//$link = shopFunctionsF::getRootRoutedUrl('index.php?option=com_virtuemart');
$link = JURI::root().'index.php?option=com_virtuemart';

echo '<br/><br/>';
//$link='<b>'.JHtml::_('link', JURI::root().$link, $this->vendor->vendor_name).'</b> ';

//   echo vmText::_('COM_VIRTUEMART_MAIL_VENDOR_TITLE').$this->vendor->vendor_name.'<br/>';
/* GENERAL FOOTER FOR ALL MAILS */
   echo vmText::_('COM_VIRTUEMART_MAIL_FOOTER' ) . '<a href="'.$link.'">'.$this->vendor->vendor_name.'</a>';
        echo '<br/>';
   echo $this->vendor->vendor_name .'<br />'.$this->vendor->vendor_phone .' '.$this->vendor->vendor_store_name .'<br /> '.$this->vendor->vendor_store_desc.'<br />';
?>

So far I deleted this part:
Quote
echo '<br/><br/>';
//$link='<b>'.JHtml::_('link', JURI::root().$link, $this->vendor->vendor_name).'</b> ';

//   echo vmText::_('COM_VIRTUEMART_MAIL_VENDOR_TITLE').$this->vendor->vendor_name.'<br/>';
/* GENERAL FOOTER FOR ALL MAILS */
   echo vmText::_('COM_VIRTUEMART_MAIL_FOOTER' ) . '<a href="'.$link.'">'.$this->vendor->vendor_name.'</a>';
        echo '<br/>';
   echo $this->vendor->vendor_name .'<br />'.$this->vendor->vendor_phone .' '.$this->vendor->vendor_store_name .'<br /> '.$this->vendor->vendor_store_desc.'<br />';
?>

then I tried to change order status and it redirected me to the invoice render...

I want to either delete the whole footer altogether OR better yet, change the URL to my website URL and delete the last 2 lines (shop name repeats twice).

Virtuemart: 3.4.2
Joomla. 3.6.2

Please help I have tried to Google the solution for the past 2 hours but my knowledge of php is too limited to understand...

StefanSTS

You can just add some HTML and remove the PHP code.

... ?>
<div class="mylovelyfooter">
    My Footer with all the stuff I want.
</div>

--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

txkeyboards

Quote from: StefanSTS on June 11, 2019, 13:53:19 PM
You can just add some HTML and remove the PHP code.

... ?>
<div class="mylovelyfooter">
    My Footer with all the stuff I want.
</div>

I don't understand what you said I'm sorry... :'(

StefanSTS

If you have a single vendor shop you can just add static HTML into mail_html_footer.php of invoice view.

Of course you should use an override in your templte in your folder
/templates/your_template/html/com_virtuemart/invoice/mail_html_footer.php.

Now it is:

<?php
/**
* Layout for the shopping cart, look in mailshopper for more details
*
* @package VirtueMart
* @subpackage Cart
* @author Max Milbers
* @link ${PHING.VM.MAINTAINERURL}
* @copyright Copyright (c) 2004 - 2018 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');
/* TODO Chnage the footer place in helper or assets ???*/
if (empty($this->vendor)) {
$vendorModel VmModel::getModel('vendor');
$this->vendor $vendorModel->getVendor();
}

$link JURI::root().'index.php?option=com_virtuemart';

echo 
'<br /><br />';
// $link = '<b>'.JHtml::_('link', JURI::root().$link, $this->vendor->vendor_name).'</b> ';
// echo vmText::_('COM_VIRTUEMART_MAIL_VENDOR_TITLE').$this->vendor->vendor_name.'<br/>';
/* GENERAL FOOTER FOR ALL MAILS */
echo vmText::_('COM_VIRTUEMART_MAIL_FOOTER') . '<a href="'.$link.'">'.$this->vendor->vendor_name.'</a>';
echo '<br />';
echo $this->vendor->vendor_name .'<br />'.$this->vendor->vendor_phone .' '.$this->vendor->vendor_store_name .'<br /> '.$this->vendor->vendor_store_desc.'<br />';
?>


<?php if ($this->vendor->vendor_letter_footer == 1) { ?>
<?php if ($this->vendor->vendor_letter_footer_line == 1) { ?>
<hr style="border-top: 1px solid #CCCCCC;" />
<?php ?>
<div id="vmdoc-footer" class="vmdoc-footer" style="font-size: <?php echo $this->vendor->vendor_letter_footer_font_size?>px;">
<?php echo $this->replaceVendorFields($this->vendor->vendor_letter_footer_html$this->vendor); ?>
</div>
<?php ?>


You can change it to:


<?php
/**
* Layout for the shopping cart, look in mailshopper for more details
*
* @package VirtueMart
* @subpackage Cart
* @author Max Milbers
* @link ${PHING.VM.MAINTAINERURL}
* @copyright Copyright (c) 2004 - 2018 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');
?>

<div class="mylovelyfooter">
    My Footer with all the stuff I want.
</div>

--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

txkeyboards

Quote from: StefanSTS on June 18, 2019, 10:48:12 AM
If you have a single vendor shop you can just add static HTML into mail_html_footer.php of invoice view.

Of course you should use an override in your templte in your folder
/templates/your_template/html/com_virtuemart/invoice/mail_html_footer.php.

Now it is:

<?php
/**
* Layout for the shopping cart, look in mailshopper for more details
*
* @package VirtueMart
* @subpackage Cart
* @author Max Milbers
* @link ${PHING.VM.MAINTAINERURL}
* @copyright Copyright (c) 2004 - 2018 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');
/* TODO Chnage the footer place in helper or assets ???*/
if (empty($this->vendor)) {
$vendorModel VmModel::getModel('vendor');
$this->vendor $vendorModel->getVendor();
}

$link JURI::root().'index.php?option=com_virtuemart';

echo 
'<br /><br />';
// $link = '<b>'.JHtml::_('link', JURI::root().$link, $this->vendor->vendor_name).'</b> ';
// echo vmText::_('COM_VIRTUEMART_MAIL_VENDOR_TITLE').$this->vendor->vendor_name.'<br/>';
/* GENERAL FOOTER FOR ALL MAILS */
echo vmText::_('COM_VIRTUEMART_MAIL_FOOTER') . '<a href="'.$link.'">'.$this->vendor->vendor_name.'</a>';
echo '<br />';
echo $this->vendor->vendor_name .'<br />'.$this->vendor->vendor_phone .' '.$this->vendor->vendor_store_name .'<br /> '.$this->vendor->vendor_store_desc.'<br />';
?>


<?php if ($this->vendor->vendor_letter_footer == 1) { ?>
<?php if ($this->vendor->vendor_letter_footer_line == 1) { ?>
<hr style="border-top: 1px solid #CCCCCC;" />
<?php ?>
<div id="vmdoc-footer" class="vmdoc-footer" style="font-size: <?php echo $this->vendor->vendor_letter_footer_font_size?>px;">
<?php echo $this->replaceVendorFields($this->vendor->vendor_letter_footer_html$this->vendor); ?>
</div>
<?php ?>


You can change it to:


<?php
/**
* Layout for the shopping cart, look in mailshopper for more details
*
* @package VirtueMart
* @subpackage Cart
* @author Max Milbers
* @link ${PHING.VM.MAINTAINERURL}
* @copyright Copyright (c) 2004 - 2018 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');
?>

<div class="mylovelyfooter">
    My Footer with all the stuff I want.
</div>


Thank you so much!!!  :-*