So Ive recently installed Commerce Billy and Billy Mail, I followed the instructions on how to install both of them, yet the email sent out just has the text "Find your invoice attached." in it and no actual attachment for a pdf invoice. I've tried reinstalling multiple times and have been pulling my hair out for days now trying to figure out what is wrong. Any help would be greatly appreciated as I have no idea what the issue might be.

Using:
Mime Mail 7.x-1.0-beta3
Commerce Billy 7.x-1.0-beta2
Commerce Billy Mail 7.x-1.x-dev
Running on drupal core 7.29

Comments

anybody’s picture

Seems like a duplicate, please have a look at the related issues. Try the latest .dev please and especially have a look at how to install the PDF library (See commerce_billy.module page)

frankenstein123’s picture

Thank you for your answer. It seems the new dev built helped a little, however now I'm getting an error messages upon sending the pdf invoice: "Fatal error: Call to undefined function commerce_billy_pdf_gen_filename() in htdocs/sites/all/modules/commerce_billy_mail/commerce_billy_mail.module on line 184" Any help would be appreciated.

frankenstein123’s picture

A slight update on my situation. I managed to fix the aforementioned error with instructions on another topic here. However, it's still not attatching the actual PDF to the e-mail it sends out. I've installed the latest dev version AND made sure to follow the exact instructions on installing DOM PDF, but still nothing. I do get a few warnings when the e-mail is sent out: "Notice: Undefined index: und in commerce_billy_pdf_commerce_order_view() (line 184 of sites/all/modules/commerce_billy/modules/commerce_billy_pdf/commerce_billy_pdf.module).
Warning: date_timezone_set() expects parameter 1 to be DateTime, boolean given in format_date() (line 2013 of /includes/common.inc).
Warning: date_format() expects parameter 1 to be DateTimeInterface, boolean given in format_date() (line 2023 of /includes/common.inc).", but I'm not sure if this is the real issue.

frankenstein123’s picture

Just a small update, still havent managed to fix any of the errors and the PDF file isn't being attatched to the e-mails despite multiple reinstalls. It does however render the PDF just fine if I follow the link ""invoice-pdf/[order-id]"

Apfel007’s picture

The error comes up, because the variable

$order->field_commerce_billy_i_date[LANGUAGE_NONE][0]['value']

is EMPTY!!

I will debug it.

skottali’s picture

Add this code to commerce_billy_mail_mail() in commerce_billy_module file


 if (isset($params['attachments'])) {
        $message['attachments'][] = $params['attachments'];
      }

Mime mail is required to send attachments in dupal7. Go to "admin/config/system/mailsystem" and make sure "Site-wide default Class"
is set to Mimemailsystem.

Now PDFs will be attached to mails.

Hope that helps.

anybody’s picture

Status: Active » Fixed

Please try the latest .dev version I've just released and provide some feedback please.

  • Anybody committed 31020e9 on
    Issue #2309751 by skottal,frankenstein123: Fixing problems with missing...
  • Anybody committed 8928e11 on
    Issue #2309751 by skottal,frankenstein123: Fixing problems with missing...
frankenstein123’s picture

Great! Everything works perfectly now. Thanks to everyone who helped.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.