Jump to content
Sign in to follow this  
russmcduck

Print the invoice from checkout_success.php

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


Russ

 

"To the man who only has a hammer in the toolkit, every problem looks like a nail."

 

Abraham Maslow

Share this post


Link to post
Share on other sites

Just create a Javascript "Print this page" button...


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

Share this post


Link to post
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


Russ

 

"To the man who only has a hammer in the toolkit, every problem looks like a nail."

 

Abraham Maslow

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites

Sorry, just bad humor!


Russ

 

"To the man who only has a hammer in the toolkit, every problem looks like a nail."

 

Abraham Maslow

Share this post


Link to post
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"

Share this post


Link to post
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:

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites
Why don't you all learn Dutch, sometimes I actually succeed in making a joke in that language... ;)

 

I kinda thought that was the joke ... 8)

Share this post


Link to post
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


Russ

 

"To the man who only has a hammer in the toolkit, every problem looks like a nail."

 

Abraham Maslow

Share this post


Link to post
Share on other sites

Has anybody had a chance to try this contribution.

 

I would like some feed back at your earliest conveinience.

 

:roll:


Russ

 

"To the man who only has a hammer in the toolkit, every problem looks like a nail."

 

Abraham Maslow

Share this post


Link to post
Share on other sites

i used it :D

 

its great

much appreciated

 

needed some minor change to work on my site tho :>

Share this post


Link to post
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!

Share this post


Link to post
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...

 

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!

Share this post


Link to post
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 ;)

Share this post


Link to post
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

Share this post


Link to post
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 ;)

Share this post


Link to post
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'


Reading is beneficial - Searching is enlightening

find answers at wiki.oscommerce.com/top

Share this post


Link to post
Share on other sites

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


Russ

 

"To the man who only has a hammer in the toolkit, every problem looks like a nail."

 

Abraham Maslow

Share this post


Link to post
Share on other sites

catalog/invoice.php

 

doooppppee


Russ

 

"To the man who only has a hammer in the toolkit, every problem looks like a nail."

 

Abraham Maslow

Share this post


Link to post
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.


Russ

 

"To the man who only has a hammer in the toolkit, every problem looks like a nail."

 

Abraham Maslow

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
Sign in to follow this  

×