diff --git a/app/code/community/Fooman/EmailAttachments/Model/Observer.php b/app/code/community/Fooman/EmailAttachments/Model/Observer.php
index 50e2831..f63b973 100644
--- a/app/code/community/Fooman/EmailAttachments/Model/Observer.php
+++ b/app/code/community/Fooman/EmailAttachments/Model/Observer.php
@@ -200,7 +200,9 @@ public function beforeSendShipment($observer)
Mage::helper('emailattachments')->addAttachment(
$pdf, $mailTemplate, $this->getShipmentAttachmentName($shipment)
);
- /*
+ }
+
+ if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachinvoicepdf', $storeId)) {
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(
$shipment->getOrder()->getInvoiceCollection()
);
@@ -209,7 +211,6 @@ public function beforeSendShipment($observer)
$mailTemplate,
Mage::helper('sales')->__('Invoices for Order') . "_" . $shipment->getOrder()->getIncrementId()
);
- */
}
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
diff --git a/app/code/community/Fooman/EmailAttachments/etc/system.xml b/app/code/community/Fooman/EmailAttachments/etc/system.xml
index 54961f8..b46fe58 100644
--- a/app/code/community/Fooman/EmailAttachments/etc/system.xml
+++ b/app/code/community/Fooman/EmailAttachments/etc/system.xml
@@ -328,7 +328,7 @@
Sales > Terms and Conditions) will be automatically attached to the email. Terms
- and conditions as html and text files are not supported.]]>
+ and conditions as html and text files are not supported.]]>
selectadminhtml/system_config_source_yesno70
@@ -411,6 +411,17 @@
11
+
+
+ When set to Yes, your invoice pdf document will be
+ automatically attached to the invoice email.
+ select
+ adminhtml/system_config_source_yesno
+ 60
+ 1
+ 1
+ 1
+