News:

Looking for documentation? Take a look on our wiki

Main Menu

how to only send email invoices

Started by tomphillipspcs, August 17, 2016, 14:04:41 PM

Previous topic - Next topic

tomphillipspcs

Is it possible to send email only invoices to customer? (rather than PDF's)

I am on an up to date versions of virtuemart - but it seems to send a pretty blank PDF invoice (enclosed)

are the otpions iin "Orderstatus to use for attachment" meant to do this - or is it anotehr settings?

otherwise how do I fix the PDF invoice?

jenkinhill

Something worong there as that invoice does not contain the usual order information, order number, addresses, products details, prices etc.

Versions? 
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

tomphillipspcs

php 5.3.29
joomla 3.5.1
virtuemart 3.0.16

what would you advise I check to get that data included?

jenkinhill

Are you using all default VM templates or some commercial overrides?

Image of invoice is on a test site using VM sample data & default templates.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

tomphillipspcs

Where would I look for the template for the pdf  invoice?

GJC Web Design

components\com_virtuemart\views\invoice\tmpl\invoice.php  etc
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

tomphillipspcs

This is what is in invoice.php

and there are other files from the latest virtuemart update as well - see screenshot

so it looks as though that is all correct? Any other ideas?

Does the invoice have to be sent as a PDF? can't it just be sent as an email?

<?php
/**
*
* Order detail view
* //index.php?option=com_virtuemart&view=invoice&layout=invoice&format=pdf&tmpl=component&order_number=xx&order_pass=p_yy
* @package    VirtueMart
* @subpackage Orders
* @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.
* @version $Id: details.php 5412 2012-02-09 19:27:55Z alatak $
*/

defined('_JEXEC') or die('Restricted access');
JHtml::stylesheet('vmpanels.css', JURI::root() . 'components/com_virtuemart/assets/css/');
if ($this->_layout == "invoice") {
   $document = JFactory::getDocument();
   $document->setTitle(vmText::_('COM_VIRTUEMART_ORDER_PRINT_PO_NUMBER') . ' ' . $this->orderDetails['details']['BT']->order_number . ' ' . $this->vendor->vendor_store_name);
}

$vendorCompanyName = (!empty($this->vendor->vendorFields["fields"]["company"]["value"])) ? $this->vendor->vendorFields["fields"]["company"]["value"] : $this->vendor->vendor_store_name;

if(!empty($this->vendor->vendor_letter_css)) { ?>
   <style type="text/css">
      <?php echo $this->vendor->vendor_letter_css; ?>
   </style>
<?php }

$this->vendor->vendor_letter_header_image;

if ($this->headFooter) {
    ?>
<style><?php echo $this->vendor->vendor_letter_css; ?></style>
<div class="vendor-details-view">
<?php echo $this->replaceVendorFields($this->vendor->vendor_letter_header_html, $this->vendor); ?>
</div>

<div class="vendor-description">
<?php //echo $this->vendor->vendor_store_desc.'<br>';


    /*   foreach($this->vendorAddress as $userfields){

         foreach($userfields['fields'] as $item){
             if(!empty($item['value'])){
                 if($item['name']==='agreed'){
                     $item['value'] =  ($item['value']===0) ? vmText::_('COM_VIRTUEMART_USER_FORM_BILLTO_TOS_NO'):vmText::_('COM_VIRTUEMART_USER_FORM_BILLTO_TOS_YES');
                 }
             ?><!-- span class="titles"><?php echo $item['title'] ?></span -->
                         <span class="values vm2<?php echo '-'.$item['name'] ?>" ><?php echo $this->escape($item['value']) ?></span>
                     <?php if ($item['name'] != 'title' and $item['name'] != 'first_name' and $item['name'] != 'middle_name' and $item['name'] != 'zip') { ?>
                         <br class="clear" />
                     <?php
                 }
             }
         }
     }*/
?></div> <?php
}


if ($this->print) {
    ?>
<body onload="javascript:print();">
<?php   }
?>

<div class='spaceStyle'>
    <?php
    echo $this->loadTemplate('order');
    ?>
</div>

<div class='spaceStyle'>
    <?php
    if ($this->print) {
      echo $this->loadTemplate('items');
    } else {
        $tabarray = array('items'=>'COM_VIRTUEMART_ORDER_ITEM', 'history'=>'COM_VIRTUEMART_ORDER_HISTORY');
      shopFunctionsF::buildTabs( $this, $tabarray);
    }
    ?>
</div>
<br clear="all"/><br/>
    <?php   
if ($this->headFooter) {
    echo $this->replaceVendorFields($this->vendor->vendor_letter_footer_html, $this->vendor);
}

if ($this->vendor->vendor_letter_add_tos) {?>
<div class="invoice_tos" <?php if ($this->vendor->vendor_letter_add_tos_newpage) { ?> style="page-break-before: always"<?php } ?>>
    <?php echo $this->vendor->vendor_terms_of_service; ?>
</div>
<?php }

if ($this->print) { ?>
</body>
<?php
} ?>





GJC Web Design

it can be just an email

disable the attachment in vm admin emails
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

tomphillipspcs

so just removing the entries from the bottom box would do that?

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

tomphillipspcs

It refuses to let me delete all the entries from that bottom box - I can delete and save all but one, but if I try and delete and save all of them they all then re-appear!

so it seems to me there is no way of just having email only invoices?

GJC Web Design

make a new status that the order is set to when confirmed

set the payment plugs to that status

don't incl. in the file send
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum