Giter Site home page Giter Site logo

fooman / emailattachments Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 21.0 90 KB

Magento 1 Extension - add order confirmation, invoice, packing slip or creditmemo pdfs to your outgoing transactional emails. Also adds support for attaching terms and conditions and printing the order as a pdf.

Home Page: http://store.fooman.co.nz/extensions/magento-extension-email-attachments.html

PHP 93.80% HTML 6.20%
magento-extension

emailattachments's People

Contributors

arosenhagen avatar fooman avatar glouton avatar hostep avatar infabo avatar jochhop avatar seansan avatar sprankhub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emailattachments's Issues

Strict Notice in Magento 1.7

I use fooman_emailattachments module in my magento 1.7 website which is working fine but i got error on system.log file as below.
"Strict Notice: Declaration of Fooman_EmailAttachments_Model_Order_Pdf_Invoice::_drawHeader() should be compatible with Mage_Sales_Model_Order_Pdf_Invoice::_drawHeader(Zend_Pdf_Page $page) in /app/code/community/Fooman/EmailAttachments/Model/Order/Pdf/Invoice.php on line 35"

Base URL used for links - not Store URL

When you have attached terms and conditions to the order email, the links inside terms are incorrect on multi store Magento.

Seems like it uses Base URL instead of the Store URL when parsing markup like {{store url=''}} in the Terms.

Fooman_EmailAttachments_Model_Order_Pdf_Order - _printTableHead

Hi!

Why have you re-implemented the items-header in Fooman_EmailAttachments_Model_Order_Pdf_Order->_printTableHead and not just reused the _drawHeader method from Mage_Sales_Model_Order_Pdf_Invoice?
On the other hand you do re-use the default renderer for the items - so we get messed up.
We have adjusted the column-feeds in one of our stores according to our needs, which your printTableHead now breaks.

Thanks in advance for clearance!

PDF invoice with the email doenst get delivered

The email with the pdf invoice doesnt get delivered when in Firegento the Standard Germany is selected as PDF engine. When selecting the Standard Magento PDF engine then email is delivered to customer with PDF invoice attatched (the ugly one)

Error while printing invoices

When we try to print an invoice on our development site we get the following error:

Fatal error: require_once(): Failed opening required '/example.com/app/code/community/Fooman/EmailAttachments/controllers/Admin/OrderController.php' (include_path='/example.com/app/code/local:/data/ssd/vhosts/example.comu/source/pub/app/code/community:/example.com/app/code/core:/example.com/lib:.:/usr/share/php') in /example.com/app/code/community/Fooman/PdfCustomiser/controllers/Adminhtml/PdfCustomiser/Sales/OrderController.php on line 12

I notice that it fails to get a file from a non-existing directory Admin.
When I look at this repo I can't find the directory neither. I do find the directory AdminHtml.
https://github.com/fooman/emailattachments/tree/master/app/code/community/Fooman/EmailAttachments/controllers/Adminhtml

Might there be a typo in the directory?

Send emails more than once

Somehow order emails only send once (clicking the button more often does not result in a new email)

Is this something that can be changed?

image

Magento 1.9.1

Config Version: 0.10.1
DB Version: Not Available
Data Version: Not Available
Starting Fooman_EmailAttachments_Model_Selftester
Default store loaded
Magento version: 1.9.1.1
Fooman_EmailAttachments Config version: 0.10.1
Checking file locations
File app/locale/en_US/template/email/sales/order_new_packingslip.html does not exist
File app/locale/tr_TR/Fooman_EmailAttachments.csv does not exist
Checking rewrites
Checking database
Result: failure
Self-test finished

add support for backend templates (in frontend) to prevent error messages

On frontend PDF creating add ...

$package = Mage::getDesign()->getPackage();
$template = Mage::getDesign()->getTheme('template');

Mage::getDesign()->setArea('adminhtml')
->setPackageName('default')
->setTheme('default');

[...]
// your code goes here
[...]

Mage::getDesign()->setArea('frontend')
->setPackageName($package)
->setTheme($template);

order confirmation email not sent after Installing "Email Attachments"

Hello,

i Installed via Magento Connect the Version 0.11.2 on Magento 1.9.1.1.
Email sending with PDF files works pretty good.

But the ordering confirmation email is not sent any more after i installed.
Also manually i can not send the order confirmation email.

All other emails will be sent (invoice email or shipping email).
What can i do?

No order-mail to customer and no attachment file to admin, printing from backend = blank_page

The result of the Fooman-selftest:

Config Version: 0.11.7
DB Version: Not Available
Data Version: Not Available
Starting Fooman_EmailAttachments_Model_Selftester
Default store loaded
Magento version: 1.9.3.1
Fooman_EmailAttachments Config version: 0.11.7
Checking file locations
Checking rewrites
Checking database
Found file with extra whitespace trailing: /var/www/html/magento/lib/PEAR/HTTP/Request/Listener.php
Found file with extra whitespace trailing: /var/www/html/magento/lib/PEAR/HTTP/Request.php
Found file with extra whitespace trailing: /var/www/html/magento/includes/src/PEAR/HTTP/Request/Listener.php
Found file with extra whitespace trailing: /var/www/html/magento/includes/src/PEAR/HTTP/Request.php
Found file with extra whitespace trailing: /var/www/html/magento/includes/src/PEAR_HTTP_Request.php
Found file with extra whitespace trailing: /var/www/html/magento/includes/src/PEAR_HTTP_Request_Listener.php
Result: failure
Self-test finished

FIREGENTO - Quick Rewrite Check

#PathRewrite ClassActive ClassStatus
1 cron/observer Aoe_Scheduler_Model_Observer Aoe_Scheduler_Model_Observer OK
2 cron/schedule Aoe_Scheduler_Model_Schedule Aoe_Scheduler_Model_Schedule OK
3 cron_resource/schedule_collection Aoe_Scheduler_Model_Resource_Schedule_Collection Aoe_Scheduler_Model_Resource_Schedule_Collection OK
4 googleanalytics/ga FireGento_GermanSetup_Block_Ga FireGento_GermanSetup_Block_Ga OK
5 catalog/product_configuration FireGento_GermanSetup_Helper_Catalog_Product_Configuration FireGento_GermanSetup_Helper_Catalog_Product_Configuration OK
6 checkout/data FireGento_GermanSetup_Helper_Checkout_Data FireGento_GermanSetup_Helper_Checkout_Data OK
7 tax/config FireGento_GermanSetup_Model_Tax_Config FireGento_GermanSetup_Model_Tax_Config OK
8 core/email_template_mailer Fooman_EmailAttachments_Model_Core_Email_Template_Mailer Fooman_EmailAttachments_Model_Core_Email_Template_Mailer OK
9 core/email_queue Fooman_EmailAttachments_Model_Core_Email_Queue Fooman_EmailAttachments_Model_Core_Email_Queue OK
10 core/app_emulation Fooman_EmailAttachments_Model_Core_App_Emulation Fooman_EmailAttachments_Model_Core_App_Emulation OK
11 customer/customer_api MageB2B_CustomerId_Model_CustomerApi MageB2B_CustomerId_Model_CustomerApi OK
12 customer/customer_api_v2 MageB2B_CustomerId_Model_CustomerApiV2 MageB2B_CustomerId_Model_CustomerApiV2 OK
13 adminhtml/customer_grid MageB2B_CustomerId_Adminhtml_Block_Customer_Grid MageB2B_CustomerId_Adminhtml_Block_Customer_Grid OK
14 catalog/product_view_media Magic_Catalog_Block_Product_View_Media Magic_Catalog_Block_Product_View_Media OK
15 importexport/import_entity_customer SeventhSense_ExtendedImportExport_Model_Rewrite_Import_Entity_Customer SeventhSense_ExtendedImportExport_Model_Rewrite_Import_Entity_Customer OK
16 adminhtml/sales_order_grid Webskills_Deleteorder_Block_Adminhtml_Sales_Order_Grid Webskills_Deleteorder_Block_Adminhtml_Sales_Order_Grid OK

Everytime I generate an order, it don't send to the "sucess" page, everytime I will direct to the cart. Then the admin will receive an order mail an the customer don't.

If I test to generate pdf in backend, I will get a blank page.

Every function work correctly if I unistall the extension.

Mails are not send via Queue

To send mails via queue, instead of send them directly add following line

$emailTemplate->setQueue($this->getQueue());

or

    public function send()
    {
        $helper = Mage::helper('emailattachments');
        // Send all emails from corresponding list
        while (!empty($this->_emailInfos)) {
            $emailTemplate = Mage::getModel('core/email_template');
            $emailInfo = array_pop($this->_emailInfos);
            $helper->debug('NEW EMAIL------------------------------------------');
            $helper->debug($emailInfo->getToNames());
            $this->dispatchAttachEvent($emailTemplate, $emailInfo);
            // Handle "Bcc" recepients of the current email
            $emailTemplate->addBcc($emailInfo->getBccEmails());
            //support queuing on newer Magento versions
            $emailTemplate->setQueue($this->getQueue());
            // Set required design parameters and delegate email sending to Mage_Core_Model_Email_Template
            $emailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => $this->getStoreId()))
                //send mail from queue
                ->setQueue($this->getQueue())
                ->sendTransactional(
                    $this->getTemplateId(),
                    $this->getSender(),
                    $emailInfo->getToEmails(),
                    $emailInfo->getToNames(),
                    $this->getTemplateParams(),
                    $this->getStoreId()
                );
            $helper->debug('FINISHED SENDING');
        }
        return $this;
    }

https://github.com/fooman/emailattachments/blob/master/app/code/community/Fooman/EmailAttachments/Model/Core/Email/Template/Mailer.php#L35

Check compatibility with SUPEE-7405 security patch

Hi guys

Just noticed in the recently published SUPEE-7405 security patch, the method Mage_Core_Model_Email_Queue::send is patched.

Since this project overwrites this method in Fooman_EmailAttachments_Model_Core_Email_Queue_Fooman::send it might be a good idea to also patch it?

Here is the diff from SUPEE-7405 (for Magento CE 1.9.1.0, haven't checked the other versions yet):

                 try {
                     $mailer->send();
+                } catch (Exception $e) {
+                    Mage::logException($e);
+                }
+
                 unset($mailer);
                 $message->setProcessedAt(Varien_Date::formatDate(true));
                 $message->save();
             }
-                catch (Exception $e) {
-                    unset($mailer);
-                    $oldDevMode = Mage::getIsDeveloperMode();
-                    Mage::setIsDeveloperMode(true);
-                    Mage::logException($e);
-                    Mage::setIsDeveloperMode($oldDevMode);
-
-                    return false;
-                }
-            }
         }

         return $this;

What do you think?

Thanks!

Class 'Mage_Sales_Model_Order_Pdf_Invoice' not found

When printing an order in the backend the following error occurs (apache error log file):
Class 'Mage_Sales_Model_Order_Pdf_Invoice' not found in app/code/community/Fooman/EmailAttachments/Model/Order/Pdf/Order.php on line 15
Magento CE 1.9.1.0

Pdf attachments are not respecting other email gateway like other SMTP or Mandrill

Pdf attachments are not respecting other email gateway like other SMTP or Mandrill

We use pdf attachments + send emails via SMTP
(but use a different supplier, in this case Amasty SMTP)

Currently Pdf attachments overwrites the queue hereby breaking other extensions that need to do this for the email sending

Can this be altered so Pdf attachments would also work with other email gateways other than the queue?

Order emails not sending in 1.9.3.10

The new order emails are not sending because of the plugin. Once I disable the module, the order emails go through again. It would be awesome if this could be fixed.

Issue with Mandrill

Hi,

I'm using the module with Mandrill together, and i'm wondering if the issue is on the Mandrill side of on the Fooman side.

See issue bellow.

Error message
E_ERROR: Call to undefined method Mandrill_Message::setType()

Stack trace
…er/XXX.nl/app/code/community/Fooman/EmailAttachments/Helper/Data.php (64)
…XXX.nl/app/code/community/Fooman/EmailAttachments/Model/Observer.php (91)
…at /home/users/customer/XXX.nl/app/code/core/Mage/Core/Model/App.php (1338)
…at /home/users/customer/XXX.nl/app/code/core/Mage/Core/Model/App.php (1317)
…pp::dispatchEvent called at /home/users/customer/XXX.nl/app/Mage.php (447)
…pp/code/community/Fooman/EmailAttachments/Model/Core/Email/Template/Mailer.php (73)
…pp/code/community/Fooman/EmailAttachments/Model/Core/Email/Template/Mailer.php (28)
…/home/users/customer/XXX.nl/app/code/core/Mage/Sales/Model/Order.php (1329)
…r/XXX.nl/app/code/community/Mollie/Mpm/controllers/ApiController.php (269)
…r/XXX.nl/app/code/core/Mage/Core/Controller/Varien/Action.php (418)
…XXX.nl/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php (254)
…/customer/XXX.nl/app/code/core/Mage/Core/Controller/Varien/Front.php (172)
…at /home/users/customer/XXX.nl/app/code/core/Mage/Core/Model/App.php (354)
…re_Model_App::run called at /home/users/customer/XXX.nl/app/Mage.php (683)
in Mage::run called at /home/users/customer/XXX.nl/index.php (125)

Clients receive PDF order of other clients

Hi,

I'm using Mandrill and when the email in queue are send, the first order email has it's own order PDF but the second in queue has it's own PDF and the first order's PDF

I suppose that in Mandrill_Message , the $_attachments array is not cleared between each order

Working toghether with Yireo Email Override

As Yireo provides options of templates in local folder and custom translation I use for years already. Now wanted to add Fooman attachments. But they both seem to rewrite the same model on some level.

YIREO config
( https://github.com/yireo/Yireo_EmailOverride )
rewrite
email_template>Yireo_EmailOverride_Model_Email_Template</email_template
/rewrite

FOOMAN config
rewrite
email_template_mailer>Fooman_EmailAttachments_Model_Core_Email_Template_Mailer</email_template_mailer
/rewrite

As a result, all emails without attachment use local folder templates and emails with attachment use default ones. Is there any reasonable way to set these to work together?

No full credit card info.

Hello,

Thank you, your product is really good but we have a small issue maybe you can direct us how to fix it. when we print the orders the full credit card info doesn't show up on the pdf. and we need it because we process it somewhere else. fyi on the orders in magento it does show the full CC info.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.