Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

multi orders updates annoucement


angel2005

Recommended Posts

hi,

 

this is my first contribution, i'm newbee and i try to make my best.

 

all of multi updates status i found no one send mails and insert commentss for order. so i decide to do it and now it's done.

 

What this contribution do:

 

it's simple, when you have a lot of orders, i'm sure you want to updates the pending or another status. btu the other contribution i found update only statuses;

this one updates statuses, you can add comments by orders, and when you submit the store send mail to customers with hi new status and his own comment.

 

how to use it.

 

before select the view by status fro example 'pending', enter the comments, select the orders ansd submit.

it's important to select the view by statut, befor anything.

 

you can find here.

 

http://addons.oscommerce.com/info/5557

 

thank to shoprun for comment by orders insert.

 

send mail fix by angel

 

thank to padaben for his help.

 

have a good day

Edited by angel2005
Link to comment
Share on other sites

  • 5 weeks later...

hi, i made this post to annonce a new version of thi contribution, many mini bug are fixed. sorry for who try the first one. this one is more simple to install and don't touch the orders.php in admin folder.

 

i add screenshot inside the new version.

 

cdt

Link to comment
Share on other sites

I have prepared English translation:

 

here is to replace content of the file admin/includes/languages/english/multiorders.php

 

with

 

<?php

/*

$Id: multiorders.php,v 1.25 2007/12/17 00:28:44 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

//multi order update

define('HEADING_TITLE', 'Orders');

define('HEADING_TITLE_SEARCH', 'Order Number :');

define('HEADING_TITLE_STATUS', 'Status :');

 

 

 

define('EMAIL_SEPARATOR', '------------------------------------------------------');

define('EMAIL_TEXT_SUBJECT', 'Update of the order');

define('EMAIL_TEXT_ORDER_NUMBER', 'Number of order :');

define('EMAIL_TEXT_INVOICE_URL', 'Itemized bill :');

define('EMAIL_TEXT_DATE_ORDERED', 'Go back to command :');

define('EMAIL_TEXT_STATUS_UPDATE', 'The statute of your order was updated.' . "\n\n" . 'New Status: %s' . "\n\n" . 'If you have any questions please reply to this e-mail.' . "\n");

define('EMAIL_TEXT_COMMENTS_UPDATE', 'Here are comments for your order' . "\n\n%s\n\n");

 

define('ERROR_ORDER_DOES_NOT_EXIST', 'Error: The order n\' does not exist');

define('SUCCESS_ORDER_UPDATED', 'Success: The order is updated.');

define('WARNING_ORDER_NOT_UPDATED', 'Caution: No modification n\' was carried out. The order n\' was not updated.');

 

 

define('BUS_HEADING_TITLE','fast update');

define('BUS_TEXT_NEW_STATUS', 'To choose New Status');

define('BUS_NOTIFY_CUSTOMERS', 'To notify Customer(s)');

define('BUS_SELECT_ALL', 'Select All');

define('BUS_SELECT_NONE', 'Select None');

define('BUS_SUBMIT', 'Update Status');

define('TABLE_HEADING_ORDER_NUMBER','Order number');

define('TABLE_HEADING_CUSTOMERS', 'Customer');

define('TABLE_HEADING_ORDER_TOTAL', 'Order Total');

define('TABLE_HEADING_DATE_PURCHASED', 'Date of purchase');

define('TABLE_HEADING_STATUS', 'Status');

define('HEADING_TITLE_STATUS', 'Status :');

define('TEXT_MAX_LIGNES_CMD', 'lines per page :');

define('TEXT_ALL_ORDERS', 'All orders');

 

?>

 

I Am getting small problem, when i am changing status either the box to notify customer is selected or not customer is always getting email.

I did not have a change to look on the code. If someone have fix for that please post.

 

I will also try to look on that.

Link to comment
Share on other sites

hi here the bug fix:

look for

if (isset($_POST['notify'][$key])) {
$notify_comments = '';
if (tep_not_null($comments))

change for

if ($notify == 'true') {
	$notify_comments = '';
	if (tep_not_null($comments))

 

have a good day

Edited by angel2005
Link to comment
Share on other sites

  • 4 weeks later...

OK, I finally got around to installing your contribution, angel. I applied the two latests fixes, but I still get a javascript error on the page (this is related to the "Fermier" button, is that supposed to close the window? Because even after the "fix" on the contribution page, it doesn't work). But even so, your contribution seems to be in working order.

 

I just had to think for a moment to get how it works. Because it seems to be the procedure to update the status of several orders is like this:

 

1. Select the orders you want to update by ticking the checkboxes (in the 'select'-column) next to them.

2. Click on the select-button on each of them ('fastupdate'-column), entering a comment for each order and changing the status. Then click Update in the small window to save your changes (what does the delete button do in this window? Deletes the order?).

3. Finally, click on the Update-button at the top to apply your changes to the selected orders.

 

I tested selecting 3 orders, changed status of them and added comments. Status changed correctly and comments were sent out through mail correctly.

 

I use custom html mails and also a script that deletes the image + thumbnail of a product when quantity is zero. I plan to test this later, but I expect that everything will work fine, as this is embedded in the same loop as the standard order comments.

 

Anyway I just wanted to say thanks for a great contribution. It seems the only small thing left to fix is the 'Fermer' button as far as I can tell.

Link to comment
Share on other sites

hi and thank for comment, i'm not expert on JS and i think that the script nee to be reviewed for the 'fermer' button, i try to find how can i fix it. i read to another forum that this button work fine and for other it's not working. if someone have a idea?

Link to comment
Share on other sites

It has something to do with the formbox I think. Maybe something like document.formbox.document.close() would help. I am not sure, since I am totally green on javascript as well. Hoping that someone will find a solution to this small problem.

Link to comment
Share on other sites

Thanks for that tip, discounttools. I was certain the 'fermer' button was to close the window (as fermer means close in french), but I guess I was wrong, seeing as the 'delete' button actually does it? I wonder what it was supposed to be for...

Edited by JangoF
Link to comment
Share on other sites

yes fermer is in french, i'm looking if in my file fermer is define but i'm sure is it.

 

if you erase all in french terms for comment dont forget to keep a point '.' if you want to send comment. i read that the array can't be empty to work.

 

sorry for my poor english, i'm french..

Link to comment
Share on other sites

So the delete-button is supposed to be cancel (as in undo any changes)?

And the close-button is supposed to save the changes and hide the window?

 

But the Update-button does the same anyway, so I don't see a need for it?

 

I just removed the fermer-button and replace the delete-button with a cancel-button.

Link to comment
Share on other sites

yes that's it,

the close button is if you open but you don't want and you can close without anychange. but you can delete it because if you have made some change en check the notify case the color change.

 

it's just a security close without change.

Link to comment
Share on other sites

  • 1 month later...

Hi!

 

I translatated multiorders to spanish

Hope anyone finds it useful!

 

Best Regards

 

<?php

/*

$Id: multiorders.php,v 1.25 2007/12/17 00:28:44 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

//multi order update

define('HEADING_TITLE', 'Ordenes');

define('HEADING_TITLE_SEARCH', 'Número de Orden :');

define('HEADING_TITLE_STATUS', 'Estado :');

 

 

 

define('EMAIL_SEPARATOR', '------------------------------------------------------');

define('EMAIL_TEXT_SUBJECT', 'Actualización de la Orden');

define('EMAIL_TEXT_ORDER_NUMBER', 'Número de Orden :');

define('EMAIL_TEXT_INVOICE_URL', 'Itemized bill :');

define('EMAIL_TEXT_DATE_ORDERED', 'Regresar :');

define('EMAIL_TEXT_STATUS_UPDATE', 'El estado de su orden ha sido actualizado.' . "\n\n" . 'Nuevo Estado: %s' . "\n\n" . 'Si tiene dudas porfavor reponder al siguiente correo electrónico.' . "\n");

define('EMAIL_TEXT_COMMENTS_UPDATE', 'A continuación, los comentarios acerca de su orden' . "\n\n%s\n\n");

 

define('ERROR_ORDER_DOES_NOT_EXIST', 'Error: La orden n\' no existe');

define('SUCCESS_ORDER_UPDATED', 'Cambio Exitoso: La Orden ha sido actualizada.');

define('WARNING_ORDER_NOT_UPDATED', 'Precaución: No se ha modificado n\' nada. La orden n\' no ha sido actualizada.');

 

 

define('BUS_HEADING_TITLE','actualización rápida');

define('BUS_TEXT_NEW_STATUS', 'Escoger Nuevo Estado');

define('BUS_NOTIFY_CUSTOMERS', 'Notificar Comprador(es)');

define('BUS_SELECT_ALL', 'Seleccionar Todo');

define('BUS_SELECT_NONE', 'Seleccionar Ninguno');

define('BUS_SUBMIT', 'Actualizar Estado');

define('TABLE_HEADING_ORDER_NUMBER','Número de Orden');

define('TABLE_HEADING_CUSTOMERS', 'Comprador');

define('TABLE_HEADING_ORDER_TOTAL', 'Total de Orden');

define('TABLE_HEADING_DATE_PURCHASED', 'Fecha de Compra');

define('TABLE_HEADING_STATUS', 'Estado');

define('HEADING_TITLE_STATUS', 'Estado :');

define('TEXT_MAX_LIGNES_CMD', 'Líneas por página :');

define('TEXT_ALL_ORDERS', 'Todas las ordenes');

 

?>

Link to comment
Share on other sites

here the code to hide the box aka 'fermer'. appli this

open admin/multiorders.php

look for this

function infoMailing(act, id, evt) {

var obj = 'infoMailing';

formCmd = document.forms['updateStatus'];

formBox = document.forms['infoMail'];

switch (act) {

just after add this just before: case 'supprimer' :

case 'fermer' :

		var id = formBox.elements['key'].value;

		setVisibilityObj(obj, 'cacher');

		formCmd.elements['update_oID[' + id + ']'].checked = false;

		if (theObj2 = getObjectClasse('tr_' + id)) {

			if (theObj2.className !== 'dataTableRow') theObj2.className = 'dataTableRow';

		}
	break

the result look like this for this part

function infoMailing(act, id, evt) {

var obj = 'infoMailing';

formCmd = document.forms['updateStatus'];

formBox = document.forms['infoMail'];

switch (act) {
	case 'fermer' :

		var id = formBox.elements['key'].value;

		setVisibilityObj(obj, 'cacher');

		formCmd.elements['update_oID[' + id + ']'].checked = false;

		if (theObj2 = getObjectClasse('tr_' + id)) {

			if (theObj2.className !== 'dataTableRow') theObj2.className = 'dataTableRow';

		}
	break

	case 'supprimer' :

		var id = formBox.elements['key'].value;

		setVisibilityObj(obj, 'cacher');

		formCmd.elements['update_oID[' + id + ']'].checked = false;

		if (theObj2 = getObjectClasse('tr_' + id)) {

			if (theObj2.className !== 'dataTableRow2') theObj2.className = 'dataTableRow2';

		}

	break

 

look for this

<td colspan="4" class="main"><input type="button" value="Fermer" onclick="java script:infoMailing('fermer');">  </td>

remplace with this

<td colspan="4" class="main"><input type="button" value="Fermer" onclick="infoMailing('fermer');">  </td>

 

now when you clic on 'fermer' the box is hidden.

Link to comment
Share on other sites

  • 1 month later...

Hello, like the contrib but not working right

 

can any one help?

 

multi.jpg

 

 

loads like this dosent really work when i click stuff?

 

any ideas?

 

Batch Update Status contrib is good. just want one of them to work right.

 

 

thanks

Link to comment
Share on other sites

  • 3 weeks later...

Hi, Thanks for the contribution but when I type in N° commande (Order number) text box an order number for example 120, it still lists all the orders.. so this filter is not working.. normally it should show me only the order number 120 (in the same way the orders.php file works).. please tell me how to fix this ..

 

 

Thank you so much

Link to comment
Share on other sites

waw thank you for your quick reply :) my osc version is osCommerce 2.2-MS2..

 

I am afraid i didn't understand your meaning here "if you have contribution installed, can you put it on signature? it's better for support"

 

Acutally I never made a contribution :'( i am just a newbie ..

 

 

also please i want you to help me : i want to see also in the list the email address of the customers, how can I add this ?

 

 

You are French, I can speak little french:

 

J'aimerai bien voir les adresses emails des clients lister à coté de leur noms dans la page multiorders.php, comment puis je faire pour rajouter ca?

 

Merci

Edited by Alexandero
Link to comment
Share on other sites

hi so if you have some contribution installed you can put it on your signature, see in "my control" on the right of the forum site. i can see to put email adresse, and i see alos for the search cause it's working on my oscommerce version.

 

i check it and post result here.

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