Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Admin Comments Toolbar 2.0


skeedo

Recommended Posts

I've updated this small mod after reading some suggestons. The Comments Toolbar will now select the appropriate order status option as well as insert text into the comments field in orders.php. It will also now append text instead of replacing text.

 

comment_bar.gif

 

Contribution:

http://www.oscommerce.com/community/contributions,869

 

Any suggestions, questions or comments please let me know here!

Link to comment
Share on other sites

It's nice that.

As a suggestion: You could make the actual TEXT assigned to a button come from the database for easier editing if you make the include file php instead of html...

 

Mattice

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

Link to comment
Share on other sites

Hello - nice mod.

 

How can I edit the line so that it allows me to enter the consignment number in a popup window ?

 

Ie Click shipped with Parcelforce button - it then pops up and asks me for the consignment number and the fills the text:

 

blah blah - your order has been despatched with parcelforce you may track your order at www.parcelforce.com with the following tracking number: <number we entered in popup>

 

Cheers,

 

Graham

www.medisave.co.uk

Graham Wright

________________

Link to comment
Share on other sites

Ad this right under var usrdate = '';:

 

var cnum = '';

 

Please not those are two single quotes!

 

Stick this under the getdate() function:

 

function getcnum () {

cnum = prompt("Enter consignment number:");

}

 

In the onClick for your consignment number button, put this before Updatecomment:

 

getcnum();

 

Similar to the way there is getdate(); for the backorder button.

 

Let me know if you need further help.

Link to comment
Share on other sites

A quick but handy addition to this usefull contrib:

 

Rename the comment_bar.html to comment_bar.php

Rename the include() in orders.php to .php too.

 

Then in comment_bar.php change:

 

 myTextarea.value += 'n---n' + obj;

 

to:

 

 myTextarea.value += 'nn---<?php echo date("d-m-Y H:i:s"); ?>---n' + obj;

 

Now whenever you add another comment to the box it will automagically add a timestamp to it.... like:

We have not received a Paypal payment for this order. Please go to your shopping cart and checkout to complete your order.

 

---17-01-2003 10:03:46---

Your product is on backorder, please allow 1-2 days for restock.

 

---21-01-2003 13:37:49---

Your order has been processed and will ship in 24 hrs. Please allow 4-8 days to delivery. Thank you For your order.

HTH

Mattice

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

Link to comment
Share on other sites

I'm sure you deserve time off to go walk the dog for that little addition.  

Or does your dog walk you?

I usually saddle him up and gallop through my village lasso-ing cows while wearing only my fluffy pink cowboy hat....

...makes me real popular with all them cowgirlies.. woohooah! :D

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

Link to comment
Share on other sites

I thought about that but realized there shouldn't really be a need for it as an order status could have multiple reasons.

 

I bet now you'll want me to make it prompt you for the reasons, ha!

:D

 

Possibly in the next version, although I really like the buttons more than select box, because buttons are quicker.

Link to comment
Share on other sites

Thanks for the great contribution! Makes some of the repetetive stuff easier. Although having the different items added into the DB for easy changes would be nice. But works great, thanks again!

>Insert witty comment here<

Link to comment
Share on other sites

Kewl Contribution! I installed it last night and have been fiddling with things since....One thing that bugged me was the comments in the account history. The status was listed descending and the comments were ascending. Decided I didn't need both in that spot and removed the status. much cleaner.

 

Also added the comments to the status update email and things are peachy keen... :D

Link to comment
Share on other sites

A new mirror was set up. During that time the downloads were temporarily unavailable. Should be fixed now.

 

Regards,

Mattice

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

Link to comment
Share on other sites

A thousand thanks Skeedo (and Matice for the useful addition).

This Mod is going to be so useful for me when I finally get my new OS store live as we have a high volume of low value orders anything like this that speeds things up will be a great help.

I will think of you every day while I am proccessing the orders :D

Best wishes

Steve

Link to comment
Share on other sites

Also added the comments to the status update email and things are peachy keen... :D

How are you managing to get the comments to show in the customer emails?

There have been a few threads on this http://www.www.oscommerce.com/forums/viewtopic...8590&highlight=

http://www.www.oscommerce.com/forums/viewtopic...1612&highlight=

but I can't make out if it is supposed to send out the comments with the emails by default or if it is something you have to add ?

Best wishes

Steve

Link to comment
Share on other sites

Steve,

 

I found an old thread from June 2002 that had a solution that worked for me.

http://www.www.oscommerce.com/forums/viewtopic...1752&highlight=

 

It was a fairly simple addition to the Admin/orders.php. The one drawback is that it doesn't send each comment seperately. Each change of status adds the new comment to the email with the change of status. So I just changed the wording of the email to read:

 

Date Ordered: Monday 07 October, 2002

 

Your order status history is:

 

Your order is packed and being shipped via Priority Mail. Please allow 4-8 days for delivery.

 

---22-01-2003 21:05:48---

This order has been CANCELLED.

 

 

You new status is: Cancelled

 

Please reply to this email if you have any questions.

 

The solution also adds the order number to the subject line.

Link to comment
Share on other sites

Thank you so much for that Birdbrain, it was just what I needed and it works a treat  :D

 

Can you post the definitive solution in here please so we can point people to the fix rather than having to trawl around back to june . especially if they are using a new snapshot they might be unsure, like I am, exactly what to do.

 

Thanks in advance

Link to comment
Share on other sites

This has been tested and works on pre-November snapshots. I have not it tested on the new checkout. Be aware that it also does not seperate the new comments added by the comment bar, it simply adds the newest to the list.

 

(starts about line 48 of orders.php)



$email = STORE_NAME . "n" . EMAIL_SEPARATOR . "n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "n" .

EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "nn [Comments]n" .

tep_draw_textarea_field('comments', 'soft', '60', '5', $order->info['comments']) . "nn" .

"n" . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);





tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT . ' (order #'

. $oID . ')', nl2br($email), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

Link to comment
Share on other sites

This has been tested and works on pre-November snapshots. I have not  it tested on the new checkout. Be aware that it also does not seperate the new comments added by the comment bar, it simply adds the newest to the list.

 

[/code]

 

Ok Kim thanks for that. I will give it a test anyway.

Link to comment
Share on other sites

  • 2 months later...

Great contribution.

 

1 question.

 

How to I change the comment from looking like this:

Thank you for your order. Your Tracking number is 14112324

 

into

Thank you for your order

 

Your Tracking number is:

14112324

 

 

How do I jump lines in comment_bar.php ?

 

<button class="cbutton" onClick="updateComment('Your order has been processed and will shipped in 24 hrs. Please allow 72 working hours to delivery. Thank you For your order. ','6');">Order Shipped</button>

 

I want to JUMP lines in my comments, and NOT writing all my comment on 1 line... :(

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