Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Print the invoice from checkout_success.php


Guest

Recommended Posts

Is the a contribution that allows the customer to print the invoice from checkout_success.php?

I really could use that.

Thanks in advance

Russ

Link to comment
Share on other sites

Thanks for the reply Mattice but I was really looking for a contribution

that allows the customer to print the same invoice from orders in admin on checkout_success.php.

 

I did accomplish it by modifying checkout_success.php, application_top.php, configure.php, new directory in classes, two symbolic links, and a partridge in a pare tree.

 

It works great but hardly a contributable solution for others. I guess as you said javascript button on the checkout_confirm. It just wouldn't have accomplished what I was after.

 

Laters Russ

Link to comment
Share on other sites

and a partridge in a pare tree.

 

That is the part I do not understand... ?!

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

Sorry, just bad humor!

 

There is no such thing as bad humour I think :D

But you got me curious, which is why I asked....

 

Thought I missed out on that special all solving new function in PHP

there... got me worried ;)

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

and a partridge in a pare tree.

 

That is the part I do not understand... ?!

 

I thought it funny as heck ... but then Mattice can be ... well ... you know ... a tad slow ... :wink:

Link to comment
Share on other sites

I thought it funny as heck ... but then Mattice can be ... well ... you know ... a tad slow ... :wink:

 

I've just never become the old me after that shock therapy.

kernelbook.gifkernelbook.gifkernelbook.gif

It's the penguins you know. They're after me... :shock:

 

Why don't you all learn Dutch, sometimes I actually succeed in making a joke in that language... ;)

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

I went ahead and created the contribution for this!

minus symbolic links and the partridges.

 

it can be found at in Zip format:

http://www.oscommerce.com/community/contri...ons,1037/page,4

and

http://www.oscommerce.com/community/contri...ons,1038/page,4

in tar.gz format

 

I accidentally posted them once each in features instead of adding one to

the other. Maybe I can get help fixing that.

 

If anyone wants to try it first I will set up a demo.

For Linda and Mattice I will give access to my pre live shop to test.

email me or IM russmcduck@aol

 

:D

Link to comment
Share on other sites

for privacy reasons the use can not be recommended...because the opening invoice-window includes the id in the end of the url...if i change manually the id to a former one i can see older orders from other customers with their adresses and dates..

this should be fixed!!!!!

 

the idea of this contrib is good, but only if i forget the security and privacy...

WAR is not the answer!

Link to comment
Share on other sites

  • 2 weeks later...
for privacy reasons the use can not be recommended...because the opening invoice-window includes the id in the end of the url...if i change manually the id to a former one i can see older orders from other customers with their adresses and dates..

this should be fixed!!!!!

 

the idea of this contrib is good, but only if i forget the security and privacy...

 

I'm with you on this one. The hack is pretty great and a superb feature to offer. I have basically removed the ability to view the invoice but have left the page showing an order number - I like that part of it particularly.

 

If a fix can be found for the potential security problem, this could prove to be a superb hack!

Link to comment
Share on other sites

you can encrypt the order id's and store those in the database.

 

not too hard to become reality when you have the time/need for it.

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

Any work happening on encrypting the order ID for security purposes? This is a great replacement for the last step in the checkout process.

 

Now, if someone would just combine the payment and shipping pages...

 

(Still wishing I was remotely competent at creating code...)

Ryan Thrash

Link to comment
Share on other sites

Now, if someone would just combine the payment and shipping pages...

 

(Still wishing I was remotely competent at creating code...)

 

I think NOW is a good time to start reading code :)

 

jsut make a DEV enviroment and start playing and reading at php.net

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

thats an interesting point about the order number.... never thought of that

 

these forums are sort of like CNN - if you didnt know a hot spot before you do now :lol:

 

but I would be interested in a solution for this 'hot spot'

Link to comment
Share on other sites

  • 4 months later...

Thanks to Jason Judge for this code.

 

replace

$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);

 $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");

 

With

global $customer_id;

 $oIDresult = false;

 if (tep_session_is_registered("customer_id"))

 {

 $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);

     $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS

     . " where orders_id = '" . tep_db_input($oID) . "'"

     . " and customers_id = " . $customer_id);

     $oIDresult = tep_db_fetch_array($orders_query);

 }

 

 if($oIDresult === false)

 {

     echo "<html><head><title>Oops No Invoice Available</title></head><body bgcolor=#FFCC00><div align=center><center><table  

  border=0 cellspacing=5 cellpadding=10><tr><td><font face=verdana color=000000 size=3>If you find yourself at this screen, You have chosen NOT to create an account, and as promised we  

  will not keep record of your personal information including order history from which this invoice derives. However  

  if you gave your email address at checkout an order detail has been emailed to you. If you do not recieve an email or for

  any other questions or comments please <a href=contact_us.php>Contact Us!<br><br>For payment by check or money order please remit payment

  to:<br>" . STORE_NAME_ADDRESS . "<br> Reference order #:" . $oID . "<br><br>Thank You!!</a></font></td><tr>

  </table></center></div></body></html>";

     return;

 }

 

The html message echoed is optional, I added this for purchase without an account. and pay by check or money order.

 

Enjoy

Link to comment
Share on other sites

Change In catalog/invoice.php

 

replace

$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);  

$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");

 

with

global $customer_id;  

$oIDresult = false;  

if (tep_session_is_registered("customer_id"))  

{  

$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);  

$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS  

. " where orders_id = '" . tep_db_input($oID) . "'"  

. " and customers_id = " . $customer_id);  

$oIDresult = tep_db_fetch_array($orders_query);  

}  

 

if($oIDresult === false)  

{  

echo "<html><head><title>Oops No Invoice Available</title></head><body bgcolor=#FFCC00><div align=center><center><table  

border=0 cellspacing=5 cellpadding=10><tr><td><font face=verdana color=000000 size=3>If you find yourself at this screen, You have chosen NOT to create an account, and as promised we  

will not keep record of your personal information including order history from which this invoice derives. However  

if you gave your email address at checkout an order detail has been emailed to you. If you do not recieve an email or for  

any other questions or comments please <a href=contact_us.php>Contact Us!</a><br><br>For payment by check or money order please remit payment  

to:<br>" . STORE_NAME_ADDRESS . "<br> Reference order #:" . $oID . "<br><br>Thank You!!</font></td><tr>  

</table></center></div></body></html>";  

return;  

}

 

Sorry for the multiple posts, not enough coffee yet ....

This one works.

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...