Jump to content
PopTheTop

Fancier Invoice & Packingslip v1.0

Recommended Posts

Thanks!

 

I'm just curious as to WHY! I've got a couple of customers with the older version of this contribution and I don't understand where it interacts with PayPal IPN. Now, it could be that that interaction is a new thing.

 

If I knew what the problem was, I might be able to code around it.

Thanks!

 

-= Dave =-

I added the PaypalIPN contribution titled: osCommerce_PayPal_IPN_v1.3 and it seems to work in the Paypal sandbox just fine. The only problem I have, which is still unresolved, is that the emailed invoice generated by osCommerce with the Fancier Invoice and Packing slip contribution v1.6 produces an error message when printing the customer's billing address. This only occurs with Paypal payments. Other forms of payment generate good emails. I get a "Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/aspenshop/www/dev/oscommerce/catalog/includes/functions/general.php on line 46" message in the billing address area.

 

My php skills are not sufficient to solve this problem. The delivery address area of the invoice prints just fine, and I have copied that code over and replaced the code for the billing address and it works fine there too. I will use this as a temporary workaround and hope I don't encounter too many orders where the billing and delivery addresses are different. I do want to get this fixed asap.

 

I would suggest that you go ahead with your project, making sure to use the above titled Paypal contribution. If you have the same problem, perhaps you have the skills to fix. If so, please share your fix with us. As far as I can tell, that is the only problem.

 

Ron

Share this post


Link to post
Share on other sites

I get this error. Only when someone uses paypal Credit Card Payment module.

 

Fatal error: Using $this when not in object context in /home/xxxxx/public_html/admin/invoice.php on line 180

 

Anyone got any idea?

 

invoice.gif

Edited by rocket468

Share this post


Link to post
Share on other sites

If i take this out it works.

 

if (tep_not_null($order->info['cc_number'])) {

$this->cc_card_number_less_middle_digits = substr($order->info['cc_number'], 0, 4) . str_repeat('x', (strlen($order->info['cc_number']) - 8)) . substr($order->info['cc_number'], -4);

?>

<td> <b><?php echo ENTRY_PAYMENT_METHOD; ?></b> <?php echo $order->info['payment_method']; ?> (<?php echo $order->info['cc_type']; ?>)<br><?php echo tep_draw_separator('pixel_trans.gif', '100%', '6'); ?><br> <b><?php echo ENTRY_PAYMENT_CC_NUMBER; ?></b> <?php echo $this->cc_card_number_less_middle_digits; ?></td>

<?php

} else

Share this post


Link to post
Share on other sites
Instructions For Getting This Great Contribution to Work with Paypal IPN (osCommmerce_PayPal_IPN_v1.2)

 

These are the steps required in addition to those in the installation guide that comes with the contribution, in order to get it to work with the official osCommmerce_PayPal_IPN_v1.2 contribution. Backup your files before performing these steps!!! It worked for me, but nothing is guaranteed in the coding world!

 

Repeat Step 7 of the installation instructions for /catalog/includes/modules/payment/paypal_ipn.php, as follows

....................

(REMANDER DELETED FOR BREVITY)

Missing sub-total, shipping method, handling fee, sales tax and final total

 

di11on

 

What a life saver this is! Thanks also for the fix on /functions/general.php! That had me going in circles.

 

I noticed that the sub-total, shipping method, handling fee, sales tax and final total lines print when a customer pays by check/money order but fails to print only if paid by Paypal. (these are the only payment methods I have installed so can't say if the problem affects other payment modules)

 

The code that prints this info is located in the templates at catalog/includes/modules/email_invoice/templates/

 

I use catalog/includes/modules/email_invoice/templates/html_invoice.php for my shop.

 

This code near line 259 in html_invoice.php fails to print for Paypal payments:

<?php
 for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
echo '				  <tr>' . "\n" .
	 '					  <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
	 '					  <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
	 '				  </tr>' . "\n";
 }
?>

 

When I say it fails to print I'm saying it fails to print any of the data or the <td> . "\n" 's. It is like this code is completely skipped.

 

I'm betting that $order->totals is empty after going through the Paypal IPN. This would mean that sizeof($order->totals) is 0 making $n =0. Since $i starts at 0 then $i = $n and the rest of the for statement is skipped.

 

Is there any way to restore the data to the array so it can be printed?

 

Ron (aspenshops)

Share this post


Link to post
Share on other sites

Great contrib and easier to install than I thought!

 

I seem to have missed one small part though. When I check out the invoice online, I'm getting this:

HEADING_PRODUCTS HEADING_MODEL HEADING_UNIT HEADING_TOTAL

 

and this:

NAVBAR_TITLE_4

 

Instead of what should actually be there, any idea which file I missed?


Feedback on our new OSC Online store greatly appreciated in any thread!

Share this post


Link to post
Share on other sites

Ack, I actually completely forgot the main reason I came to this thread :)

 

I'm not getting a copy of the purchase e-mail forwarded to my e-mail box anymore. Any way to get that going again? It's still listed through conifg as true, after installing this contrib, I stopped getting copies of the e-mail though. Although I DID get the new e-mail for purchasing through my own site as a buyer, I didn't get the copy as the seller.


Feedback on our new OSC Online store greatly appreciated in any thread!

Share this post


Link to post
Share on other sites
Missing sub-total, shipping method, handling fee, sales tax and final total

 

di11on

 

What a life saver this is! Thanks also for the fix on /functions/general.php! That had me going in circles.

 

I noticed that the sub-total, shipping method, handling fee, sales tax and final total lines print when a customer pays by check/money order but fails to print only if paid by Paypal. (these are the only payment methods I have installed so can't say if the problem affects other payment modules)

 

The code that prints this info is located in the templates at catalog/includes/modules/email_invoice/templates/

 

I use catalog/includes/modules/email_invoice/templates/html_invoice.php for my shop.

 

This code near line 259 in html_invoice.php fails to print for Paypal payments:

<?php
 for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
echo '				  <tr>' . "\n" .
	 '					  <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
	 '					  <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
	 '				  </tr>' . "\n";
 }
?>

 

When I say it fails to print I'm saying it fails to print any of the data or the <td> . "\n" 's. It is like this code is completely skipped.

 

I'm betting that $order->totals is empty after going through the Paypal IPN. This would mean that sizeof($order->totals) is 0 making $n =0. Since $i starts at 0 then $i = $n and the rest of the for statement is skipped.

 

Is there any way to restore the data to the array so it can be printed?

 

Ron (aspenshops)

 

Just a followup. I had forgotten I commented out a line in catalog/includes/modules/payment/paypal.php because it sparked error messages and never got back to figuring out what it does and what effect commenting had (other than eliminating the error message).

 

Original code around line 595

// load the after_process function from the payment modules
  $payment_modules->after_process();
  $cart->reset(true);

// unregister session variables used during checkout
  tep_session_unregister('sendto');

 

and the code as I have it now:

// load the after_process function from the payment modules
// ERROR produced in next line: Fatal error: Call to a member function on a non-object in /home/aspenshop/www/dev/oscommerce/catalog/includes/modules/payment/paypal_ipn.php on line 593. Commented the line out on 08/14/2006. 

// $payment_modules->after_process();
$cart->reset(true);

// unregister session variables used during checkout
  tep_session_unregister('sendto');

 

Does this code have anything to do with why the taxes, shipping, handling fees and final total are not showing up in the emailed invoices (when Paypal is the method of payment) or is the error here a separate issue? I'm thinking it is a separate issue but Paypal related nevertheless because I still get the taxes, shipping, etc. listed in non-paypal paid invoices with this code commented out.

Share this post


Link to post
Share on other sites

Figured out the navbar stuff. Well, I didn't quite figure it out, but I figured out how to fix it anyways :)

 

I still need to have a copy e-mail sent to me for all orders though and haven't figured that out yet

I'm not getting a copy of the purchase e-mail forwarded to my e-mail box anymore. Any way to get that going again? It's still listed through conifg as true, after installing this contrib, I stopped getting copies of the e-mail though. Although I DID get the new e-mail for purchasing through my own site as a buyer, I didn't get the copy as the seller.

Feedback on our new OSC Online store greatly appreciated in any thread!

Share this post


Link to post
Share on other sites
I added the PaypalIPN contribution titled: osCommerce_PayPal_IPN_v1.3 and it seems to work in the Paypal sandbox just fine. The only problem I have, which is still unresolved, is that the emailed invoice generated by osCommerce with the Fancier Invoice and Packing slip contribution v6.2 produces an error message when printing the customer's billing address. This only occurs with Paypal payments. Other forms of payment generate good emails. I get a "Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/aspenshop/www/dev/oscommerce/catalog/includes/functions/general.php on line 46" message in the billing address area....... (remainder deleted for brevity)

 

Ron

 

RESOLVED

This applies when using Fancier Packing Slip and Invoice v6.2 and osCommerce PayPal IPN Module v1.3 For 2.2MS2 contributions together.

 

Regarding the error message in emailed invoices at the beginning of the SOLD TO section:

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in [your path]/catalog/includes/functions/general.php on line 46

 

D11on provided the answer in an earlier post and I read right past it the first time.

 

"..correction to catalog\includes\functions\general.php that fixes a general bug"

 

find in tep_address_format:

 elseif (isset($address['country']) && tep_not_null($address['country'])) {
  $country = tep_output_string_protected($address['country']);

 

and replace with:

 elseif (isset($address['country']) && tep_not_null($address['country'])) {
  $country = tep_output_string_protected($address['country']['title']);

 

Thanks to d11on for this fix (reference Posts # 751, 752, 753, 754)

Share this post


Link to post
Share on other sites
I get this error. Only when someone uses paypal Credit Card Payment module.

 

Fatal error: Using $this when not in object context in /home/xxxxx/public_html/admin/invoice.php on line 180

 

Anyone got any idea?

 

invoice.gif

 

I get the same problem did you manage to solve this?

Share this post


Link to post
Share on other sites

Kelly:

 

Did you find a solution to the single character showing up for the country in the addresses on your packing slips and invoices?

 

I offered some suggestions that didn't work for you. Now, all of a sudden, I have the same problem. Was wondering if you tracked it down?

 

I suspect a problem in includes/functions/general.php since I recently modified it to fix another problem (the code change was found in one of the forums). I tried to revert to the original general.php but that just brought that problem back and I can't tell if the country would have printed correctly or not.

 

 

 

Hi,

 

i have 2 questions regarding the print_my_invoice function.

 

First question:

 

print_my_invoice.jpg

 

I installed the latest Fancier Invoice Swedish version and I realised the invoice no doesn't come up in the top left hand corner.

 

in public_html/includes/languages/english/print_my_invoice.php

 

define('INVOICE_TEXT_INVOICE_NR', 'Invoice #.: ');
define('INVOICE_TEXT_INVOICE_DATE', 'Date of invoice: ');
// Misc Invoice Info
define('INVOICE_TEXT_NUMBER_SIGN', '#');
define('INVOICE_TEXT_DASH', '-');
define('INVOICE_TEXT_COLON', ':');

 

and in public_html/print_my_invoice.php

 

<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
  <TD ALIGN="left" VALIGN="top"><span class="pageHeadingSM"><FONT FACE="Verdana" SIZE="1" COLOR="#006699"><strong><?php echo nl2br(STORE_NAME_ADDRESS); ?></strong></font></span><br><br><FONT FACE="Verdana" SIZE="2" COLOR="#006699"><strong><?php echo INVOICE_TEXT_INVOICE_NR; ?> <?php// echo INVOICE_TEXT_NUMBER_SIGN; ?> <?php// echo date("y"); ?><?php// echo INVOICE_TEXT_DASH; ?> <?php echo $oID; ?><BR><?php echo INVOICE_TEXT_INVOICE_DATE; ?><?php echo tep_date_short($order->info['date_purchased']); ?></strong></font></TD>
   <td style="padding: 10px 10px 0px 0px; vertical-align: top;" align="right"><?php echo '<input type="image" src="' . INVOICE_IMAGE . '" width="' . INVOICE_IMAGE_WIDTH . '" height="' . INVOICE_IMAGE_HEIGHT . '" " alt="' . INVOICE_IMAGE_ALT_TEXT . '" onClick="java script:ShowHide(\'comments_open\',\'comments_close\');">'; ?></td>
 </tr>
<tr>
  <td colspan="2">

 

How do i generate the invoice number on the print my invoice.php?

Second question:

 

In the same print_my_invoice.php, the address isn't completely shown. The address in my admin/invoice is

 

456 Road

Dunn,

North Carolina

North Carolina

United States 28334

 

But it is cut off in the print_my_invoice (see pic above). Is there any way i can show the full address?

 

Thanks in advance :D

Share this post


Link to post
Share on other sites

Ok in my email options i have sent HTML or text invoice to customers to true. nothing has changed.

 

I recently moved all my files to a different server. No coding was changed.

 

Now i get this message after confirming check out.

 

 

Warning: main(/public_html/admin/includes/languages/english/invoice.php): failed to open stream: No such file or directory in /byunspee/public_html/includes/modules/email_invoice/email_invoice.php on line 30

 

Warning: main(/public_html/admin/includes/languages/english/invoice.php): failed to open stream: No such file or directory in /public_html/includes/modules/email_invoice/email_invoice.php on line 30

 

Fatal error: main(): Failed opening required '/admin/includes/languages/english/invoice.php' (include_path='.:/usr/local/lib/php') in /public_html/includes/modules/email_invoice/email_invoice.php on line 30

 

The order does come through though, any clues?


Remember what the Bible says: He who is without sin, cast the first rock. And I shall smoketh it.

Share this post


Link to post
Share on other sites
Ok in my email options i have sent HTML or text invoice to customers to true. nothing has changed.

 

I recently moved all my files to a different server. No coding was changed.

 

Now i get this message after confirming check out.

Warning: main(/public_html/admin/includes/languages/english/invoice.php): failed to open stream: No such file or directory in /byunspee/public_html/includes/modules/email_invoice/email_invoice.php on line 30

 

Warning: main(/public_html/admin/includes/languages/english/invoice.php): failed to open stream: No such file or directory in /public_html/includes/modules/email_invoice/email_invoice.php on line 30

 

Fatal error: main(): Failed opening required '/admin/includes/languages/english/invoice.php' (include_path='.:/usr/local/lib/php') in /public_html/includes/modules/email_invoice/email_invoice.php on line 30

 

The order does come through though, any clues?

I just solved my problem with getting the above errors today. Here is how I fixed it.

 

Go to your catalog/includes/local folder and locate configure.php file. You must edit this file so that all the paths are correct.

// Folder Definitions

define('DIR_FS_ADMIN', '/home/YOUR_DOMAIN/public_html/catalog/admin/'); // absolute path required

define('EMAIL_INVOICE_DIR', 'email_invoice/');

define('INVOICE_TEMPLATE_DIR', 'templates/');

 

// Email Invoice File Definitions

define('FILENAME_EMAIL_INVOICE', 'email_invoice.php');

define('FILENAME_EMAIL_CACHE_FILE', 'temp_cache.php');

define('FILENAME_ORDERS_INVOICE', 'invoice.php');

Mine works like a charm now. :thumbsup:

Share this post


Link to post
Share on other sites
Ok in my email options i have sent HTML or text invoice to customers to true. nothing has changed.

 

I recently moved all my files to a different server. No coding was changed.

 

Now i get this message after confirming check out.

Warning: main(/public_html/admin/includes/languages/english/invoice.php): failed to open stream: No such file or directory in /byunspee/public_html/includes/modules/email_invoice/email_invoice.php on line 30

 

Warning: main(/public_html/admin/includes/languages/english/invoice.php): failed to open stream: No such file or directory in /public_html/includes/modules/email_invoice/email_invoice.php on line 30

 

Fatal error: main(): Failed opening required '/admin/includes/languages/english/invoice.php' (include_path='.:/usr/local/lib/php') in /public_html/includes/modules/email_invoice/email_invoice.php on line 30

 

The order does come through though, any clues?

 

First steps:

This is saying it can't find includes/languages/english/invoice.php on your server.

1. using your FTP software, your host's control panel, or other method to access your server files, navigate to and find: /admin/includes/languages/english/invoice.php

1a. if you find it, open it and make sure it's the invoice.php that has a bunch of define statements in it (i.e: define('INVOICE_TEXT_THANK_YOU', 'Thank you for shopping at');. If not, you probably have the wrong invoice.php file in that location. Go to step 2.

Retrieve the correct one from your backups and upload to /admin/includes/languages/english/

 

2. Retrieve the correct file from your backups and upload to /admin/includes/languages/english/

 

 

 

The fact that your orders are coming through is good and tells you that the problem is clearly in the admin area.

Share this post


Link to post
Share on other sites
Figured out the navbar stuff. Well, I didn't quite figure it out, but I figured out how to fix it anyways :)

 

I still need to have a copy e-mail sent to me for all orders though and haven't figured that out yet

 

Am I to assume there is no way to get a copy of all orders forwarded to my e-mail address using this contrib?


Feedback on our new OSC Online store greatly appreciated in any thread!

Share this post


Link to post
Share on other sites
Ok in my email options i have sent HTML or text invoice to customers to true. nothing has changed.

 

I recently moved all my files to a different server. No coding was changed.

 

Now i get this message after confirming check out.

Warning: main(/public_html/admin/includes/languages/english/invoice.php): failed to open stream: No such file or directory in /byunspee/public_html/includes/modules/email_invoice/email_invoice.php on line 30

 

Warning: main(/public_html/admin/includes/languages/english/invoice.php): failed to open stream: No such file or directory in /public_html/includes/modules/email_invoice/email_invoice.php on line 30

 

Fatal error: main(): Failed opening required '/admin/includes/languages/english/invoice.php' (include_path='.:/usr/local/lib/php') in /public_html/includes/modules/email_invoice/email_invoice.php on line 30

 

The order does come through though, any clues?

 

Young Tae

 

sorry, my previous reply got away from me while trying to edit it. Perhaps this will seem more lucid:

 

First steps:

 

This is saying it can't find includes/languages/english/invoice.php on your server.

 

1. using your FTP software, your host's control panel, or other method to access your server files, navigate to and find: /admin/includes/languages/english/invoice.php

 

1a. If you don't find the file skip to step 2 (below).

 

1b. if you find it, open it and make sure it's the invoice.php that has a bunch of define statements in it (i.e: define('INVOICE_TEXT_THANK_YOU', 'Thank you for shopping at');. If not, you probably have the wrong invoice.php file in that location. Go to step 2.

 

2. Retrieve the correct file from your backups and upload to /admin/includes/languages/english/. This will be the file with the define statements in it. You may have to add in any revisions you made earlier to this file such as defining your 'STORE_URL_ADDRESS', 'INVOICE_IMAGE', etc.

 

The fact that your orders are coming through is good and tells you that the problem is clearly in the admin.

 

Ron

Share this post


Link to post
Share on other sites
First steps:

This is saying it can't find includes/languages/english/invoice.php on your server.

1. using your FTP software, your host's control panel, or other method to access your server files, navigate to and find: /admin/includes/languages/english/invoice.php

1a. if you find it, open it and make sure it's the invoice.php that has a bunch of define statements in it (i.e: define('INVOICE_TEXT_THANK_YOU', 'Thank you for shopping at');. If not, you probably have the wrong invoice.php file in that location. Go to step 2.

Retrieve the correct one from your backups and upload to /admin/includes/languages/english/

 

2. Retrieve the correct file from your backups and upload to /admin/includes/languages/english/

The fact that your orders are coming through is good and tells you that the problem is clearly in the admin area.

 

 

WRONG


Remember what the Bible says: He who is without sin, cast the first rock. And I shall smoketh it.

Share this post


Link to post
Share on other sites
I just solved my problem with getting the above errors today. Here is how I fixed it.

 

Go to your catalog/includes/local folder and locate configure.php file. You must edit this file so that all the paths are correct.

 

Mine works like a charm now. :thumbsup:

 

RIGHT


Remember what the Bible says: He who is without sin, cast the first rock. And I shall smoketh it.

Share this post


Link to post
Share on other sites
Kelly:

 

Did you find a solution to the single character showing up for the country in the addresses on your packing slips and invoices?

 

I offered some suggestions that didn't work for you. Now, all of a sudden, I have the same problem. Was wondering if you tracked it down?

 

I suspect a problem in includes/functions/general.php since I recently modified it to fix another problem (the code change was found in one of the forums). I tried to revert to the original general.php but that just brought that problem back and I can't tell if the country would have printed correctly or not.

 

 

I have the same problem and realise it has been haused by applying the latest patches in Mileston 2 update 060817. It is related to changing tep_output_string_protected($address['country']) to tep_output_string_protected($address['country']['title']). I'm not yet sure of a fix other than reverting back to before the update.

 

Tom

Share this post


Link to post
Share on other sites

Country truncated in emailed invoices / okay in admin

 

Mary Doe

1234 Main St

Anytown, USA 99999

U

 

 

I have the same problem and realise it has been haused by applying the latest patches in Mileston 2 update 060817. It is related to changing tep_output_string_protected($address['country']) to tep_output_string_protected($address['country']['title']). I'm not yet sure of a fix other than reverting back to before the update.

 

Tom

Thanks Tom for the lead. I did recently apply the Milestone 2 update 060817 about that time. I will look into that later today (been up all night with a contribution that I couldn't get to work so will take a long nap before tackling this problem.) I appreciate the guidance. If I nail it I'll post feedback on what the fix is.

 

Ron

Share this post


Link to post
Share on other sites
Support for...

Fancier Invoice & Packingslip v1.0

by PopTheTop

*advertising offsite link

 

This will replace your current boring invoice and packing slip with a much nicer, cleaner and fancier invoice and packing slip. I added a box around certain sections with a drop shadow. Also, I added a few other goodies as well as the order number to both.

 

Hi, I've installed this contri but I keep getting some coded text on the invoice, any Idea how I can fix this, also the print invoice button when clicked on, it takes to an empty URL....... any help is greatly appreciated.

 

 

Order # 100004

Tuesday 29 August, 2006

 

--------------------------------------------------------------------------------

NAVBAR_TITLE_4

--------------------------------------------------------------------------------

 

 

HEADING_PRODUCTS HEADING_MODEL HEADING_UNIT HEADING_TOTAL

Share this post


Link to post
Share on other sites

Tom - perfectpassion (and others)

 

Pertaining to: problem with emailed invoices having truncated address causing partial printout of the country name or emailed invoices with htmlspecialchars() error at beginning of Buyer's address.

 

Affects: osCommerce 2.2 Milestone 2 060817 Update with 'osCommerce PayPal IPN Module v1.3 and Fancier Invoice & Packingslip v1.3 contributions

 

Using your clue, I went back into catalog\includes\functions\general.php and found the code you referenced. I found my comment that [title] was added to make this work with the osCommerce Paypal IPN Module v1.3 per some super sleuthing by d1llon. If I take [title] out of the code it fixes the address in the emailed invoice for non-paypal customers, but reinserts the htmlspecialchars() problem for Paypal transactions.

 

I think the best approach is for me to put [title] back in so it works with Paypal and try to find a way to make the non-paypal invoices work with it in. That's a little beyond my skill levels, so any help from anyone would be appreciated. Again, if I find a fix I'll post it.

 

Ron

 

 

RESOLVED

This applies when using Fancier Packing Slip and Invoice v6.2 and osCommerce PayPal IPN Module v1.3 For 2.2MS2 contributions together.

 

Regarding the error message in emailed invoices at the beginning of the SOLD TO section:

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in [your path]/catalog/includes/functions/general.php on line 46

 

D11on provided the answer in an earlier post and I read right past it the first time.

 

"..correction to catalog\includes\functions\general.php that fixes a general bug"

 

find in tep_address_format:

 elseif (isset($address['country']) && tep_not_null($address['country'])) {
  $country = tep_output_string_protected($address['country']);

 

and replace with:

 elseif (isset($address['country']) && tep_not_null($address['country'])) {
  $country = tep_output_string_protected($address['country']['title']);

 

Thanks to d11on for this fix (reference Posts # 751, 752, 753, 754)

Edited by aspenshops

Share this post


Link to post
Share on other sites

Still can't seem to get a copy of the purchase e-mail forwarded to the store owner. Here's the bottom of the code from email_invoice.php:

$ei_message->build_message();

$ei_message->send($order->customer['name'], $order->customer['email_address'], STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_TEXT_SUBJECT);

 

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

$ei_message->send(STORE_OWNER, SEND_EXTRA_ORDER_EMAILS_TO, $order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT);

}

}

 

?>

 

Isn't there just something very quick and easy I can do to that last part to force it to forward the e-mails to me? I have everything enabled correctly through the admin. Help!


Feedback on our new OSC Online store greatly appreciated in any thread!

Share this post


Link to post
Share on other sites
Support for...

Fancier Invoice & Packingslip v1.0

by PopTheTop

*advertising offsite link

 

This will replace your current boring invoice and packing slip with a much nicer, cleaner and fancier invoice and packing slip. I added a box around certain sections with a drop shadow. Also, I added a few other goodies as well as the order number to both.

 

 

Hi, another problem I'm having is at checkout, whenever I click on confirm order I get the following error:

 

Warning: main(/home/nu-oro.com/public_html/catalog/admin/includes/languages/english/invoice.php): failed to open stream: No such file or directory in /home/nu-oroco/public_html/osCommerce/catalog/includes/modules/email_invoice/email_invoice.php on line 30

 

Warning: main(/home/nu-oro.com/public_html/catalog/admin/includes/languages/english/invoice.php): failed to open stream: No such file or directory in /home/nu-oroco/public_html/osCommerce/catalog/includes/modules/email_invoice/email_invoice.php on line 30

 

Fatal error: main(): Failed opening required '/home/nu-oro.com/public_html/catalog/admin/includes/languages/english/invoice.php' (include_path='.:/usr/local/lib/php') in /home/nu-oroco/public_html/osCommerce/catalog/includes/modules/email_invoice/email_invoice.php on line 30

 

Please help, thank you

Share this post


Link to post
Share on other sites
Still can't seem to get a copy of the purchase e-mail forwarded to the store owner. Here's the bottom of the code from email_invoice.php:

Isn't there just something very quick and easy I can do to that last part to force it to forward the e-mails to me? I have everything enabled correctly through the admin. Help!

The code looks good to me. It is unmodified.

 

Some first steps:

 

1. verify the path: catalog/includes/modules/email_invoice.php

2. Review Step 6 in the installation instructions (Install.htm):

Step 6:

You need to add a new configure.php file into your catalog/includes/local folder. This file may or may not exist, if it does not, simply upload the included configure.php file to your catalog/includes/local folder.

 

Please Note:

Before you do, you must edit this file so that all the paths are correct.

 

 

 

If you already have configure.php file into your catalog/includes/local folder, just add the following to it before the final ?>

 

// Folder Definitions
define('DIR_FS_ADMIN', '/home/YOUR_DOMAIN/public_html/catalog/admin/'); // absolute path required
define('EMAIL_INVOICE_DIR', 'email_invoice/');
define('INVOICE_TEMPLATE_DIR', 'templates/');

// Email Invoice File Definitions
define('FILENAME_EMAIL_INVOICE', 'email_invoice.php');
define('FILENAME_EMAIL_CACHE_FILE', 'temp_cache.php');
define('FILENAME_ORDERS_INVOICE', 'invoice.php');

 

in the above, change /home/YOUR_DOMAIN/public_html/catalog/admin/'); // absolute path required to reflect your absolute path to /catalog/admin/.

 

3. The above steps may not be necessary if the emails are getting to your customers.... it can't hurt to check tho..

 

I'm a puzzled by the line that reads:

	if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

 

 

You have it correct, and I have this installed and working, but it seems this code would want SEND_EXTRA_ORDER_EMAILS_TO to be 'true', not null..... but hey, it works here.

 

Have you tried adding some temporary test code just above the if statement that would set SEND_EXTRA_ORDER_EMAILS_TO to true, false, or null just to see what happens? If changing to one of these states gets the email coming, then you know the problem lays ahead of this code where SEND_EXTRA_ORDER_EMAILS_TO gets set.

 

You mentioned needing a quick and easy fix. If setting SEND_EXTRA_ORDER_EMAILS_TO true, false, or whatever works you could commit blasphemy and just leave it in hardcoded. You won't be able to shut off the emails from the admin console. If it were me I would leave it in just to get the business operating properly and followup and fix the problem later. The hard part is having the incentive to follow up. And you really need to in order to avoid a can of worms later on if some other contrib or feature you want depends on this being fully functional.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×