Latest News: (loading..)
Jack_mcs

Additional Orders Info

75 posts in this topic

This contribution consists of code that has been around for several years and some of my own code. I thought uploading it as a contribution might be helpful to others, so here it is.

 

It adds the following to the shops orders section, making it much easier to check the orders at a glance.

 

Orders list page:

Orders ID

 

Orders list page - right column:

Shipping Method

Comments

Products Ordered

Other Orders

 

Orders edit, Invoice and packing Slip pages:

Customers ID

Order ID

Date & Time

Shipping Method

 

Invoice page:

Option in admin->Shipping/Packaging to display comments

 

Packing Slip page:

Option in admin->Shipping/Packaging to display comments

Option in admin->Shipping/Packaging to display signatures

 

Jack

Edited by Jack_mcs

Share this post


Link to post
Share on other sites
This contribution consists of code that has been around for several years and some of my own code. I thought uploading it as a contribution might be helpful to others, so here it is.

 

It adds the following to the shops orders section, making it much easier to check the orders at a glance.

 

Orders list page:

Orders ID

 

Orders list page - right column:

Shipping Method

Comments

Products Ordered

Other Orders

 

Orders edit, Invoice and packing Slip pages:

Customers ID

Order ID

Date & Time

Shipping Method

 

Invoice page:

Option in admin->Shipping/Packaging to display comments

 

Packing Slip page:

Option in admin->Shipping/Packaging to display comments

Option in admin->Shipping/Packaging to display signatures

 

Jack

Hi Jack..!

 

Could you please post a snapshot ?

 

Thanks,

 

Best regards,

Nathali

Share this post


Link to post
Share on other sites

A new version has been uploaded with the following changes:

 

-> Added code to highlight selected payment methods

-> Added code to show completed orders as well as the total number of orders

-> Added screenshots

 

Jack

Share this post


Link to post
Share on other sites

This is a good contribution!

 

But i have a litlle problem.

 

When i try import he sql I get this message:

Hiba

 

SQL-kérés: Dokumentáció

 

INSERT INTO configuration( configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function )

VALUES (

'', 'Show Orders Comments - Invoice', 'SHOW_ORDERS_COMMENTS_INVOICE', 'true', 'Display the orders comments on the Invoice<br>(true=on false=off)', '7', '13', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now( ) , NULL

);

 

MySQL jelzi: Dokumentáció

#1366 - Incorrect integer value: '' for column 'configuration_id' at row 1

 

I'm newbie and i cant figure what is the problem.

 

Please help me if you can!

 

Sorry for my english

 

Thanks a lot......

Share this post


Link to post
Share on other sites

Try changing the part that reads

VALUES (
'', 'Show Orders Comments

to

VALUES (
NULL, 'Show Orders Comments

 

Jack

Share this post


Link to post
Share on other sites
Try changing the part that reads
VALUES (
'', 'Show Orders Comments

to

VALUES (
NULL, 'Show Orders Comments

 

Jack

 

Thanks alot!

 

This is solve my problem! :D

 

 

Great contribution!

Share this post


Link to post
Share on other sites

A new version has been uploaded and contains these changes:

 

-> Changed mysql file to be strict-mode compatible

-> Changed code for comments to only show those meant to be seen by the customer

-> Added code to display other orders for Purchased Without Account orders

 

Jack

Share this post


Link to post
Share on other sites

Sorry but i dont find where

 

Invoice page:

Option in admin->Shipping/Packaging to display comments

 

Packing Slip page:

Option in admin->Shipping/Packaging to display comments

Option in admin->Shipping/Packaging to display signatures

 

it works but i dont find where are this options. During the instalation i had not any error (I thnik :rolleyes: )

 

Thanks.

Share this post


Link to post
Share on other sites

Yes.

 

This sql, acording AdditionalOrdersInfo_V_1.2

 

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function)

VALUES (NULL,'Show Orders Comments - Invoice', 'SHOW_ORDERS_COMMENTS_INVOICE', 'true', 'Display the orders comments on the Invoice<br>(true=on false=off)', '7', '43', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function)

VALUES (NULL,'Show Orders Comments - Packing Slip', 'SHOW_ORDERS_COMMENTS_PACKING_SLIP', 'true', 'Display the orders comments on the Packing Slip<br>(true=on false=off)', '7', '44', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function)

VALUES (NULL,'Show Packing Slip Signatures', 'SHOW_PACKING_SLIP_SIGNATURES', 'true', 'Add lines for Signatures on the packing slip<br>(true=on false=off)', '7', '45', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function)

VALUES (NULL, 'Show Orders Status Check', 'SHOW_ORDERS_STATUS_CHECK', 'Delivered', 'Set Orders Status name used in your shop to indicate a completed order. A comma separated list may be used if more than one name is used.', '7', '46', NULL, now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function)

VALUES (NULL, 'Show Orders Highlight Payment', 'SHOW_ORDERS_HIGHLIGHT_PAYMENT', 'Cash on Delivery', 'Set the payment method that should be highlighted. Leave blank for none or use a comma separated list to mark more than one.', '7', '47', NULL, now(), NULL);

 

but i dont see nothing new in anywhere accordin the configuration.

 

Thanks.

Share this post


Link to post
Share on other sites

Then your Shipping/Packaging section in admin must use a non-standard ID. The only way you can tell where it is woud be to look in the database.

 

Jack

Share this post


Link to post
Share on other sites

Ok.

 

I dont know if may iadmin is or not standartd but i'll try to right.

 

Could you please post a snapshot where is the correct?

 

And, whre i can put the new comments?. I had a true the display but i dont know whre i put it.

 

Thanks.

Edited by piltri

Share this post


Link to post
Share on other sites

Go to admin.

In the left column, click on the Configuration group.

In that group, click on the Shipping/Packaging link.

 

Jack

Share this post


Link to post
Share on other sites

I am looking for a contribution, or instructions, for putting the shipping method on the packing slip. This one seems to indicate that but is not real clear. Can you help?

Share this post


Link to post
Share on other sites

Jack,

 

Thanks for great contrib, again.

 

Just a short question or 2:

1. When it says *comments it just means that there are comment with this order.

It will not show them below the word *comments?

 

If not, I have the comments-at-a-glance contri installed AND the order-at-a-glance but this gives me some more info.

 

2. What does this mean:

 

Other Orders: 1

Completed: 0

Totaling: €106.95

 

Thanks again!

Edited by i2Paq

Share this post


Link to post
Share on other sites
Jack,

 

Thanks for great contrib, again.

 

Just a short question or 2:

1. When it says *comments it just means that there are comment with this order.

It will not show them below the word *comments?

 

If not, I have the comments-at-a-glance contri installed AND the order-at-a-glance but this gives me some more info.

 

2. What does this mean:

 

Other Orders: 1

Completed: 0

Totaling: €106.95

 

Thanks again!

1 - The comments is just an indicator showing that there are comments in the order. The next version will show the comment (or part of it).

 

2 - Other Orders: 1 - one other order has been made by this customer

Completed: 0 - should be the number of completed orders. I'll have to check this since it used to work but I see now it doesn't.

Totaling: €106.95 - total of all orders by this customer.

 

Jack

Share this post


Link to post
Share on other sites
1 - The comments is just an indicator showing that there are comments in the order. The next version will show the comment (or part of it).

 

2 - Other Orders: 1 - one other order has been made by this customer

Completed: 0 - should be the number of completed orders. I'll have to check this since it used to work but I see now it doesn't.

Totaling: €106.95 - total of all orders by this customer.

 

Jack

 

OK, thanks for you answer.

 

If you could fix the Completed part then I will hand you a fix to make your contribution fully Multilingual in the orders.php.

The others will follow shortly B)

 

4) Add the following to the end of the admin/includes/languages/english/orders.php

file before the last ?>. Also add it to any other language file you use.

 

/*** BOF: Additional Orders Info ***/

define('TEXT_INFO_SEE_OTHER_ORDERS', 'Click to see other orders');

define('TEXT_INFO_SHIPPING_METHOD', 'Ship by: ');

define('TEXT_INFO_OTHER_ORDERS', '<b>Other Orders:</b> %s<br> <b>Completed:</b> %s<br> <b>Totaling:</b> %s');

define('TEXT_INFO_PRODUCTS_ORDERED', 'Products Ordered: ');

define('TEXT_INFO_CUSTOMER_NUMBER', 'Customernumber: ');

define('TEXT_INFO_ORDER_NUMBER', 'Ordernumber: ');

define('TEXT_INFO_DATE_TIME', 'Order Date and Time: ');

/*** EOF: Additional Orders Info ***/

 

and:

 

FINE (around line 93)

 

<td><table border="0" cellspacing="0" cellpadding="2">

 

INSERT AFTER:

 

/*** BOF: Additional Orders Info ***/

?>

<!-- Customers ID# // -->

<tr>

<td class="main"><b><?php echo TEXT_INFO_CUSTOMER_NUMBER; ?></b></td>

<td class="main"><?php echo $the_customers_id; ?></td>

</tr>

<!-- add Order # // -->

<tr>

<td class="main"><b><?php echo TEXT_INFO_ORDER_NUMBER; ?></b></td>

<td class="main"><?php echo tep_db_input($oID); ?></td>

</tr>

<!-- add date/time // -->

<tr>

<td class="main"><b><?php echo TEXT_INFO_DATE_TIME; ?></b></td>

<td class="main"><?php echo tep_datetime_short($order->info['date_purchased']); ?></td>

</tr>

<tr>

<td class="main"><b><?php echo TEXT_INFO_SHIPPING_METHOD; ?></b></td>

<td class="main"><?php echo tep_get_orders_shipping_method($oID); ?></td>

</tr>

<?php

/*** EOF: Additional Orders Info ***/

 

 

Hope you like this :)

Edited by i2Paq

Share this post


Link to post
Share on other sites

A new version has been uploaded with these changes:

 

-> Added code to display part of the comments in the side panel

-> Added code to display a warning if the billing and shipping address do not match

-> Fixed other orders section to display accurately

-> Moved the options in admin to the configuration section

 

Jack

Share this post


Link to post
Share on other sites

Hello and thanks for this and the many other very useful contrib(s)!

 

I've got a small problem (I hope)!

 

I'am running version 1.0 and I have missed to update to 1.1 and 1.2.

 

Now i would like to update my version to 1.3 but i miss the update docs in 1.1 and 1.2

so i used the sql files from the older versions to update the database, but now i get an error by including the sql statement from the update doc in version 1.3

 

DELETE FROM configuration WHERE configuration_key LIKE 'SHOW_ORDERS%' OR configuration_key LIKE 'SHOW_PACKING_SLIP_SIGNATURES' INSERT INTO configuration_group( configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible )
VALUES (
'289', 'Additional Info', 'Additional Orders Options', '29', '1'
);

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO configuration_group (configuration_group_id, configuration_group_tit' at line 3

 

Is there an easy way to update from version 1.0 to 1.3 or how should I proceed?

Many thanks for your efforts and support

Share this post


Link to post
Share on other sites

The sql file is missing a ; at the end of this line

delete from configuration where configuration_key like 'SHOW_ORDERS%' or configuration_key like 'SHOW_PACKING_SLIP_SIGNATURES'

Change that line to

delete from configuration where configuration_key like 'SHOW_ORDERS%' or configuration_key like 'SHOW_PACKING_SLIP_SIGNATURES';

and try it again.

 

Jack

Share this post


Link to post
Share on other sites
The sql file is missing a ; at the end of this line

delete from configuration where configuration_key like 'SHOW_ORDERS%' or configuration_key like 'SHOW_PACKING_SLIP_SIGNATURES'

Change that line to

delete from configuration where configuration_key like 'SHOW_ORDERS%' or configuration_key like 'SHOW_PACKING_SLIP_SIGNATURES';

and try it again.

 

Jack

 

Thank you, that was it!

The group_id was also already in use, I've simply changed it!

 

Can i use the update doc from vers. 1.3 to update from 1.0 or are there any other changes?

 

Many Thanks

Share this post


Link to post
Share on other sites

You probably should upload the admin/includes/additional_orders_info_comments.php file too, if that's not mentioned in the upgrade file.

 

Jack

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