Jump to content
Sign in to follow this  
angel2005

multi orders updates annoucement

Recommended Posts

for Oslover

 

hi here the code to add email address on multiorders.

open admin/includes/languages/multiorders.php and add this a the end before ?>

define('TABLE_HEADING_EMAIL_ADDRESS','email');

save

open admin/multiorder.php and look for this at ligne 81

$orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id

just after o.customers_id add this

o.customers_email_address,

the code must look like this after mod

if (isset($_GET['cID'])) {

 $cID = tep_db_prepare_input($_GET['cID']);

 $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.customers_email_address, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC";

}

between line 85 look for

$orders_query_raw = "select o.orders_id, o.customers_name,

just after o.customers_name add this

o.customers_email_address,

 

the code mus be after the mod

elseif (isset($_GET['status']) && is_numeric($_GET['status']) && ($_GET['status'] > 0)) {

 $status = tep_db_prepare_input($_GET['status']);

 $orders_query_raw = "select o.orders_id, o.customers_name,o.customers_email_address, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by o.orders_id DESC";

}

make the same between line 88

$orders_query_raw = "select o.orders_id, o.customers_name,

 

put after o.customers_name,

o.customers_email_address,

 

the code must look like this after the mod

else {

 $orders_query_raw = "select o.orders_id, o.customers_name,o.customers_email_address, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by o.orders_id DESC";

}

 

then look for this code

<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>

put after thas this code

<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_EMAIL_ADDRESS; ?></td>

 

look for this

<td class="dataTableContent" style="text-align: left;"><?php echo '<a href="'.tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')).'oID='.$orders['orders_id'].'&action=edit').'">'.tep_image(DIR_WS_ICONS.'preview.gif', ICON_PREVIEW).'</a> '.$orders['customers_name']; ?></td>

and put just after

<td class="dataTableContent"><?php echo $orders['customers_email_address']; ?></td>

 

save, refresh the page and you shoul'd have email address.

Edited by angel2005

Share this post


Link to post
Share on other sites

yes cool :) thanks again

 

if you want some help regarding the search option, please check the default orders.php in admin folder, maybe the code there maybe helpful because it has search option too working with osc 2.2-MS2..

Share this post


Link to post
Share on other sites

i search on it, but i have a trouble for filtering result on output page. casu if i only paste the code the result is, on orders.php open the edit page. i try to keep the multiorders page and filter the result on it.

 

also i just have a question why do you want the search?

 

because the page load orders by orders numbers: ex:

 

the 120 is neweer than the 110.

 

it's just a question

Share this post


Link to post
Share on other sites

oh, the search is not important.. please forget about it, if i want to search i will search using orders.php

 

Wish you success and good luck ;)

Share this post


Link to post
Share on other sites

hmm .. this thing still sends email .. no matter what :S

Share this post


Link to post
Share on other sites

no matter what i do, or what i click, it still sends out mail when updating orders .. i don't want any mail to go out ..

Share this post


Link to post
Share on other sites

did you install the fixes? if yes and if you read the help, if you change something the order is selected and when you clic on update the mails are send.

 

if you have a trouble check if you have this 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))

 

also if you want only update the orders, check other contribution for that, because this one was made because other don't send mails.

Share this post


Link to post
Share on other sites

Thanks for your great contribution and I have only a problem after the installation.

 

After I click the update-butten, there are some "orders update success" messages showing on the top.

 

But the statuses dont change anymore no matter I try and try.. :blink:

 

I have no idea how to handle it after I installed all the bug-fixes.

 

Could anyone have any suggestions? Thanks for ur time and sorry for my poor english.

Share this post


Link to post
Share on other sites

I installed this contrib last night from the download on a 2.3 test site. Are all of the above corrections reflected in the downloaded code? I have everything working, however the email that is sent to the customer shows up as this:

 

Subject line says "Setting"

 

Ultralight Aircraft Sails (The stores name)

------------------------------------------------------

EMAIL_TEXT_ORDER_NUMBER 1

EMAIL_TEXT_INVOICE_URL http://www.ultralightaircraftsails.com/account_history_info.php?order_id=1

EMAIL_TEXT_DATE_ORDERED Saturday 07 April, 2012

 

EMAIL_TEXT_COMMENTS_UPDATE

 

EMAIL_TEXT_STATUS_UPDATE

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  

×