Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Additional Orders Info


Jack_mcs

Recommended Posts

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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 3 weeks later...
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

Best Regards,

Nathali

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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

  • 3 months later...

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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

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.

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

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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

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

Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

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

Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Link to comment
Share on other sites

  • 2 weeks later...

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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

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

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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

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

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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

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