Completely deactivate delivery note

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
designinside
Phoca Member
Phoca Member
Posts: 14
Joined: 14 Nov 2011, 17:20
Location: Germany

Completely deactivate delivery note

Post by designinside »

Hi!

I am very happy with this virtuemart addon, but I have a question:

How can I change the behaviour to send only the invoice by mail? I don´t need the delivery note.

I have implemented all like in you tutorial and want to use automatic function for sending the invoice.

Thanks.
Last edited by designinside on 16 Nov 2011, 02:47, edited 1 time in total.
designinside
Phoca Member
Phoca Member
Posts: 14
Joined: 14 Nov 2011, 17:20
Location: Germany

Completely deactivate delivery note

Post by designinside »

Ok, how to disable attachment of delivery note to e-mail was discussed before here:
viewtopic.php?f=27&t=13576&p=56720

I have done this and some more (with the great help of Jan! :twisted: ) to don´t send the delivery note and don´t show it in the account maintenance in the frontend. So I wrote a short How To. So you can share this.

Change some Lines in plugins/phocapdf/virtuemart/virtuemarthelper.php.


disable delivery note creation
around line 124
Change:

Code: Select all

$linkPDFDeliveryNote[] = PhocaPDFVirtueMartHelper::renderPDFIcon($sess, URL, 'deliverynote', 'order.order_print', 'createPDFDelivery', $order_id, $value->delivery_id);
to:

Code: Select all

$linkPDFDeliveryNote[] = array();
-----------------------------------------------------
let the delivery note disappear in the frontend
around line 144
Change:

Code: Select all

if (!empty($linkPDFDeliveryNote)) {
	$h .= '<td>'.JText::_('PLG_PHOCAPDF_VM_DELNOTE').'</td>';
	$i .= '<td>'.implode($linkPDFDeliveryNote, '&nbsp;').'</td>';
	}
to:

Code: Select all

//if (!empty($linkPDFDeliveryNote)) {
//	$h .= '<td>'.JText::_('PLG_PHOCAPDF_VM_DELNOTE').'</td>';
//	$i .= '<td>'.implode($linkPDFDeliveryNote, '&nbsp;').'</td>';
//}
-----------------------------------------------------

disable attachment of delivery note to e-mail
around line 206
Change:

Code: Select all

$data['attachment'][1]		= 1;
$data['attachmentfile'][1]	= $r['adelnote'];
to:

Code: Select all

//$data['attachment'][1]		= 1;
//$data['attachmentfile'][1]	= $r['adelnote'];
Done! :D

So if you don´t need delivery notes in your virtuemart shop try this!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Completely deactivate delivery note

Post by Jan »

Hi, thank you for the guide.

Jan
If you find Phoca extensions useful, please support the project
Post Reply