Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fancier Invoice & Packingslip v1.0


PopTheTop

Recommended Posts

Brilliant contrib - far better than the standard osc one!

 

I have four (probably simple) questions, but as I know virtually nothing about scripting, I need some help:

 

I have solved three of my questions, but the only one I can't figure out is how to get the address to show in the UK format.

 

Can anyone help please?

 

Bob.

Link to comment
Share on other sites

Hi There,

Firstly thanks for this contribution all working just great.

 

One quick question - How to increase the number of charecters for Model no/SKU ?

In my SQL database these can go up to 25 charrecters but in the invoice that is generated it can only have 12 charecters how to increase this to 25

 

Thanks in advance.

Kunal

 

I would like to know that too and also to show up also in the actual order, basically everywhere on the admin and customer side.

Link to comment
Share on other sites

Bob, I think I found a path to your UK address issue,

but you'll have to work out the details yourself, as the last coding I did was with dBase III+. .

But after a week here with osCommerce, I'm getting the hang of it again :D

Like someone said: Stock doesn't stay stock for long.

So many Mods! So little time!

 

Now then start in your database (MyPhpAdmin) and look at your table called "address_format".

There you can make your list of what the order of the address info should be.

Then make a note of the address_format_id for the one you want,

and go over to your "countries" table.

Find your country (or many of them),

and change the address_format_id to the number you made a note of,

the one that matches your "address_format" table entry that you want for that country.

There may be a way to do this in the admin, but I couldn't find it.

 

Anyhow, I wanted to post a help before I asked questions, so do post back if this was a fix for you.

 

How did you change your "Packing Slip" title?

My catalog\admin\includes\languages\english\packingslip.php says

define('TITLE', 'Packing Slip'); and is freshly upload to correct folder,

don't know why it's not picking up

 

Also I have the same image issue, in the upper left.

The logo file is in /images, and is listed in the DEFINE as /images/logo.jpg.

It shows elsewhere in osCommerce, and it shows on the printed invoice.

But not on the invoice, admin invoice, or packing slip screen.

Please post what you did.

 

This is a Super-Duper Mod (go Scooter!) and

I've been having great fun changing the formatting of the html_invoice template

to better suit my mood -

I've got the table listing unit #-product-qty-price-total

just like I want it.

Took 4-Ev-R to get it fixed in all the different places so that all the forms were the same!

Ok, well that *was AFTER the hours and hours to follow all the instructions Just Exactly So -

I read this list first (yes all 32 pages), and was prepared for all the problems others were having,

so was extra careful but still ended up with the dread "EMAIL_TEXT_SUBJECT" in the order email.

But that was fixed after I *finally* found the right place,

and went to check the install instructions, and sure 'nuff I'd missed that one. ptttthhh.

 

 

Then I've also made adjustments to the email subject line,

as I like to see an order number and a last name when they come in.

I had it once to: [ Sewing Prose Order 3434 - Smith - has been received. ]

But that end part was just text in EMAIL_TEXT_SUBJECT_2 from the DEFINE file,

and I wanted to add the real "Status:" part.

Now I get the order# but no last name and no status.] [ Sewing Prose Order 3435 - - Status: ]

And I didn't change the last name part! Only the ending for status after EMAIL_TEXT_SUBJECT_2.

Any clues from anyone?

And does anyone have the correct code

for getting the status to show up in the email subject? I currently have:

 

$ei_message->send($order->customer['name'], $order->customer['email_address'], STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_TEXT_SUBJECT_1 . ' ' . $insert_id . ' - ' . $order->customer['lastname'] . ' - ' . EMAIL_TEXT_SUBJECT_2 . $orders_status_array[$orders_status_name]);

 

define('EMAIL_TEXT_SUBJECT_1', 'Sewing Prose Order');

define('EMAIL_TEXT_SUBJECT_2', 'Status: ');

 

Store is not live, so have at any testing to your heart's content, choose pay by Cash.

They'll all get deleted just before we go live.

 

 

Now do tell me back if this is a good post as it is my first one,

or if I should have broken it up into smaller bits of one help/question each.

 

 

 

Toward Continued Success,

Carol Hawkey, Wyoming

Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Link to comment
Share on other sites

Well I've fixed one issue, and I'm posting here in hopes to help the next person with the "no image in the upper left" problem. So many people post back "I fixed it" and never say how for the rest of us!

 

What I found is that the image-call in 'invoice.php' is different than the one in 'packingslip.php'. The one in 'packingslip.php' worked for me, so I copied that code bit over to the 'invoice.php'. Not sure if other files are affected at this time. I just got 'invoice.php' looking the way I want it and am working on making the packing slip and email order look the same.

 

I'd sure still like y'all's opinions or ideas on my other problems:

last name in order email

STATUS in order email

packing slip TITLE

Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Link to comment
Share on other sites

Well I've fixed one issue, and I'm posting here in hopes to help the next person with the "no image in the upper left" problem. So many people post back "I fixed it" and never say how for the rest of us!

 

What I found is that the image-call in 'invoice.php' is different than the one in 'packingslip.php'. The one in 'packingslip.php' worked for me, so I copied that code bit over to the 'invoice.php'. Not sure if other files are affected at this time. I just got 'invoice.php' looking the way I want it and am working on making the packing slip and email order look the same.

 

I'd sure still like y'all's opinions or ideas on my other problems:

last name in order email

STATUS in order email

packing slip TITLE

 

Carol hi.

 

Many thanks with your help on the address format - its worked a treat.

 

I resolved my packing slip title issue, by changing a couple of lines in my catalog\admin\includes\languages\packingslip.php: I now have the following lines (I changed the text to Despatch Note):

 

define('TEXT_TITLE', 'Despatch Note');

define('INVOICE_TEXT_INVOICE', 'Despatch Note');

 

but no line saying define('TITLE', 'Despatch Note');

 

This may be the solution you need.

 

As far as the image issue is concerned, I honestly have no idea how I sorted it out. I got to the stage of changing things just for the sake of it, but did not check after each change, so I don't know what it was that worked.

 

I may have a solution to the last name and status in your email issues, but I want to double check to see that my idea works. I will post back when I have checked - probably later today.

 

Bob.

Link to comment
Share on other sites

[quote

 

I may have a solution to the last name and status in your email issues, but I want to double check to see that my idea works. I will post back when I have checked - probably later today.

 

Bob.

 

Carol - I tried my idea, but it doesn't make any difference. I think that it would be very useful, and if you do find a solution, can you let me know what it is. I will keep trying, and if I get one, I'll let you know.

 

Regards.

 

Bob.

Link to comment
Share on other sites

Bob:

"TITLE" YES! that was it! the packing slip was grabbing 'osCommerce' from who-knows-where, instead of 'Packing Slip' from english/packingslip.php. All fixed now.

 

Everyone:

On to the email subject. I've only gotten a bit closer, in that I've found a likely issue:

 

define('EMAIL_TEXT_SUBJECT_1', 'Sewing Prose Order');

define('EMAIL_TEXT_SUBJECT_2', 'Status: ');

------

 

tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT_1 . ' - ' . $insert_id . ' - ' . $order->customer['lastname'] . ' - ' . EMAIL_TEXT_SUBJECT_2 , $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

This code result: Sewing Prose Order - 3779 - atester - Status:

------

 

tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT_1 . ' ' . $insert_id . ' - ' . $order->customer['lastname'] . ' - ' . EMAIL_TEXT_SUBJECT_2 . $orders_status_array[$orders_status_name], $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

This code result: Sewing Prose Order 3766 - - Status:

------

 

I think that something in the call

$orders_status_array[$orders_status_name]

is a) not reading the dB info, and B) affecting how lastname appears.

 

The test site is http://www.sewingprose.com/catalog if you have need of a test order.

Anyone with a clue?

 

for now I've changed

define('EMAIL_TEXT_SUBJECT_2', 'Status: ');

to 'has been received'

Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Link to comment
Share on other sites

Hi,

 

I really like your contribution, everithing works in admin, but on the customer side if i click on the button to see an order, I got this:

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/dealinve/public_html/shop/includes/header.php:194) in /home/dealinve/public_html/shop/includes/boxes/categories.php on line 13

 

Could You help?

 

Thank You

 

galzoli

Link to comment
Share on other sites

Hi i think your invoice is great, i have made it work i dont know how, but it has screwed me site up a little, i get this look at the images.

What is is is them extra boxes on the left and the right which i dont want, how do i remove them?

 

 

scree1.GIF

Edited by ink4-u
Link to comment
Share on other sites

What template are you using?

Can you please provide the code, so that I can test if it is working on my end too

Really appreciate your help and you taking all this time out to help.

 

Regards,

Kunal

 

 

I don't know if this will help you but I had a problem with blank emails. After searching the forums in general I found a possible solution, tried it and it worked. In the admin section I set the search engine safe url option to false and that resolved it.

Link to comment
Share on other sites

I don't know if this will help you but I had a problem with blank emails. After searching the forums in general I found a possible solution, tried it and it worked. In the admin section I set the search engine safe url option to false and that resolved it.

 

 

Hi

 

There is no code to play with (shouldn't be). The actual template also doesn't matter. All of mine were coming up blank and now all are working. Simply go to your admin section, configuration and where it gives the option for search engine safe url's, set that to false.

 

Hope it works for you too.

Link to comment
Share on other sites

Super contribution. Thank you.

I have one question so far. When my customer receives invoice I would like to see him only first four numbers of his credit card, not first four and last four.

1111 XXXX XXXX 1111 <--- now

1111 XXXX XXXX XXXX <---- need

 

Help me please on this.

Link to comment
Share on other sites

1111 XXXX XXXX 1111 <--- now

1111 XXXX XXXX XXXX <---- need

Find this section in html_invoice.php (may be in other places as well) and change to suit your needs:

<?php
 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);
?>

Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Link to comment
Share on other sites

Hey I'm still working on the Fancier Email section. Part 1:

What file is making the call for things like "HEADING_TITLE" and "HEADING_DOWNLOAD"

and to which language file is it calling

specifically for the part that builds the html email body?

 

I am getting several TITLE/HEADING types showing as not defined, but can't find the call-er or the call-ee anywhere with a disk search in my html editor program.

 

The checkout_succes, account_history_invoice, admin/invoice and admin/packingslip are all beautiful, and all the TITLE/HEADING type defines() are showing up just right. But not in the email. I do have downloads enabled, but not the download controller MOD, and all the download info in correctly listed in the right place but the column headings aren't showing as defined(), only in the email. Headings are all good on the other four forms.

 

Then, part 2, the subject line. I'm working on getting the order id# and the last name onto the subject line. When using stock text email, the subject line shows up as "Sewing Prose Order 3604 - Smith". When using the Fancier html_invoice template, the subject line shows up as "Sewing Prose Order 3604 - ", with the last name missing. The code is the same (EMAIL_TEXT_SUBJECT_1 . ' ' . $insert_id . ' - ' . $order->customer['lastname']) for both segments.

 

Advice on either or both issues is appreciated.

Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Link to comment
Share on other sites

Find this section in html_invoice.php (may be in other places as well) and change to suit your needs:

<?php
 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);
?>

I am sory. I am not so good at PHP. Could you please change this code to have it like 1111 XXXX XXXX XXXX. Thank you very much for your help.

Link to comment
Share on other sites

I am sory. I am not so good at PHP. Could you please change this code to have it like 1111 XXXX XXXX XXXX. Thank you very much for your help.

 

Alas, I am still learning php myself. I can change some little things and can read it pretty good, but whenever I try to write a code or change big things, I end up breaking my cart and have to start all over as I am not so good at syntax yet. I don't want to do that to your cart. But, here is an idea for you to try. I can see where the code has three parts, the first part is the 4 numbers at the beginning, then the second part is some X's, then the third part is the 4 numbers at the end. Maybe if you just leave the third part off. That is what I would start with. I always try changing one little thing, then test. If it works, I try another little thing. If it doesn't I reload the backup copy and try a different little thing. Sometimes it takes hours. But I always learn a new thing every time, and next time it is better. Good luck to you.

Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Link to comment
Share on other sites

I have done it!!!

For those who whant to change:

This is original code:

 

<?php

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);

?>

 

Change to:

 

<?php

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']) - 4));

?>

Link to comment
Share on other sites

Earlier today I installed v6.1 of this quite interesting contrib. I noticed that the HTML email was not finding all required images. So I had a look at my Apache logs to see what was going wrong and noticed that some paths were not correct. I'm posting my modifications here in case anyone else is having the same problem.

 

PS: sorry if this was already mentioned. I really don't have the time to read all 33 pages of this thread but did use the forum search function and couldn't find anything related in the first 10-20 findings...

 

I made these modifications in file /catalog/includes/modules/email_invoice/templates/html_invoice.php

 

Starting at line number 285:

					  <td width="11"><img src="<?php echo $ei_image_dir; ?>borders/maingrey_01.gif" width="11" height="16" alt=""></td>
				  <td background="<?php echo HTTP_SERVER; ?>/catalog/images/borders/maingrey_02.gif"><img src="<?php echo $ei_image_dir; ?>borders/maingrey_02.gif" width="24" height="16" alt="" ></td>
				  <td width="19"><img src="<?php echo $ei_image_dir; ?>borders/maingrey_03.gif" width="19" height="16" alt=""></td>
			  </tr>
			  <tr>
				  <td background="<?php echo HTTP_SERVER; ?>/catalog/images/borders/maingrey_04.gif"><img src="<?php echo $ei_image_dir; ?>borders/maingrey_04.gif" width="11" height="21" alt=""></td>

 

Replace with:

					  <td width="11"><img src="<?php echo $ei_image_dir; ?>borders/maingrey_01.gif" width="11" height="16" alt=""></td>
				  <td background="<?php echo $ei_image_dir; ?>borders/maingrey_02.gif"><img src="<?php echo $ei_image_dir; ?>borders/maingrey_02.gif" width="24" height="16" alt="" ></td>
				  <td width="19"><img src="<?php echo $ei_image_dir; ?>borders/maingrey_03.gif" width="19" height="16" alt=""></td>
			  </tr>
			  <tr>
				  <td background="<?php echo $ei_image_dir; ?>borders/maingrey_04.gif"><img src="<?php echo $ei_image_dir; ?>borders/maingrey_04.gif" width="11" height="21" alt=""></td>

 

Starting at line number 361:

							  <td><img src="<?php echo HTTP_SERVER; ?>/catalog/images/pixel_trans.gif" width="1" height="7" alt=""></td>
					  </tr>
				  </table>
				  </td>
				  <td background="<?php echo HTTP_SERVER; ?>/catalog/images/borders/maingrey_06.gif"><img src="<?php echo $ei_image_dir; ?>borders/maingrey_06.gif" width="19" height="21" alt=""></td>
			  </tr>
			  <tr>
				  <td><img src="<?php echo $ei_image_dir; ?>borders/maingrey_07.gif" width="11" height="18" alt=""></td>
				  <td background="<?php echo HTTP_SERVER; ?>/catalog/images/borders/maingrey_08.gif"><img src="<?php echo $ei_image_dir; ?>borders/maingrey_08.gif" width="24" height="18" alt=""></td>

 

Replace with:

							  <td><img src="<?php echo $ei_image_dir; ?>pixel_trans.gif" width="1" height="7" alt=""></td>
					  </tr>
				  </table>
				  </td>
				  <td background="<?php echo $ei_image_dir; ?>borders/maingrey_06.gif"><img src="<?php echo $ei_image_dir; ?>borders/maingrey_06.gif" width="19" height="21" alt=""></td>
			  </tr>
			  <tr>
				  <td><img src="<?php echo $ei_image_dir; ?>borders/maingrey_07.gif" width="11" height="18" alt=""></td>
				  <td background="<?php echo $ei_image_dir; ?>borders/maingrey_08.gif"><img src="<?php echo $ei_image_dir; ?>borders/maingrey_08.gif" width="24" height="18" alt=""></td>

Link to comment
Share on other sites

Good Job, pleasureidea! and THANKS for posting your fix! I may try that myself but the other way, I would just as soon have only the last 4 digits showing. Now back to continuing work on getting the emailed invoice to show all TITLEs correctly and the subject line also.

Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Link to comment
Share on other sites

guys,

 

does anyone know why my extra order emails are not sending correctly this is the bounce message I am getting,

 

<Sales <[email protected]>>: "@" or

"." expected after "Sales"

 

This address has been ignored. There were no other addresses in your

message, and so no attempt at delivery was possible.

 

I think this is something to do with the email invoice bit, All my emails for purchases to the clients are working it is just when it goes to send an email to the admin that it doesnt work.

 

can someone help

 

thanks

kris

Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Link to comment
Share on other sites

I just finished installing this mod and tested it on my site. The order was duplicated twice, total of 3 identical orders with numbers #22, #23, #24. Only one item was ordered!

 

Anyone have this happen or know what the problem could be? :angry:

Link to comment
Share on other sites

I am patient, but I still need an answer, I removed all invoice.php from the catalog, but still am getting the old invoice, what else do i need to remove

Check your settings at admin side/cofiguration/e-mail options

Send HTML or Text Invoices to Customers: true

Default E-Mailed HTML Invoice Template: html_invoice.php

Link to comment
Share on other sites

These are my settings:

Title Value Action

E-Mail Transport Method smtp

E-Mail Linefeeds LF

Use MIME HTML When Sending Emails true

Verify E-Mail Addresses Through DNS false

Send E-Mails true

 

 

This is what I still see:

(the file is in /public_html/rondo/store/catalog/admin/

and named: html_invoice.php

 

Rondo ECFE Store

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

Order Number: 22

Detailed Invoice: http://www.jaysarahandy.com/rondo/store/ca...php?order_id=22

Date Ordered: Sunday 20 November, 2005

 

Products

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

1 x Daddy-Doo-A-Rama II () = $10.00

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

Sub-Total: $10.00

Total: $10.00

 

Billing Address

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

Name

Address

City

City, State Zip

United States

 

Payment Method

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

Cash on Delivery

 

What am I doing wrong... Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...