Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Ajax Order Editor


Maryw

Recommended Posts

  • Replies 110
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

 

This is probably a stupid question, but I couldnt find the answer:

 

I haven't installed the contrib yet, but if I have edited an order, is it possible to send it to the customer as a new confirmation of the order?

 

TIA

Gina

 

 

Yes it is :)

 

Paul.

Link to comment
Share on other sites

So I have added this contribution, and all seems to be working. Except I still have to change the spanish comments for english one. Part of the reason I installed was that I want to be able to send the customer a new confirmation-mail after I have edited the order (or when a paypal-customer does not return). Could anyone tell me how I can make that happen?

 

TIA

Gina

Link to comment
Share on other sites

  • 2 months later...

Hello friends!!!

I downloaded this AJAX Orders Editor Oneill, i didnt uploaded the modified files, cause in some i found different codes or words

(as you prefer). I read abou this in these forum twice but no one gives an answer, hope the creaator or someone could help me.

Thanks!!

 

Daniela

 

 

catalog/admin/invoice.php:

 

<td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '

'); ?></td>

 

I have :

<td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->billing, 1, '', '

'); ?></td>

 

 

catalog/admin/packingslip.php:

 

<td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '

'); ?></td>

 

I have:

<td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->billing, 1, '', '

'); ?></td>

 

 

catalog/admin/orders.php:

 

' <td class="dataTableContent" align="right" valign="top">' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</td>' . "\n" .

 

I have:

<td class="dataTableContent" align="right" valign="top">' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true), true, $order->info['currency'], $order->info['currency_value']) . '</td>' . "\n" .

Link to comment
Share on other sites

  • 4 weeks later...
I have installed this contribution but got 1 problem. When I click and edit the Discount or Delivery amount, such as 10.0000, it will somehow display multiple as "10.1010" if I put -10.000, then it will be display as "-10.-10-10". However, the mouseover in javascript display correct amount as you can see in picture. I try to reinstall again, but still same. Any idea how to fix this ? Thanks.

 

ajaxer8.png

 

 

I've got the same problem with this contribution, everything else is working almost fine.

 

Only when i add a product to an order, it it uses not the correct value, but 2-3% more. i then change the price by hand, to have it correct. but with the shipping costs its realy a problem. Exporting each invoice as html and then change it in the source is not a realy cool way, :blush:

 

So, if anyone had solved this problem, would be great to hear about.

 

By the way, is there something new about AJAX Order 2.0?? :rolleyes:

 

best regards

Link to comment
Share on other sites

Hello again everybody,

 

So, i had searched a bit in the sources, and if anybody has the same problem, i've here a quick and dirty hack. Only problem is, that it only works with one currancy... bit the source will tell you more about the reason why. ...

 

 

in orders_ajax.php at around line 253 you will find :

 

if ($HTTP_GET_VARS['column'] == 'value') {
	  $text_query = tep_db_query("select text, value from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $HTTP_GET_VARS['oID'] . "' and class = '" . $HTTP_GET_VARS['class'] . "'");
	  $text_ = tep_db_fetch_array($text_query);
	  $text = str_replace(round((float)$text_['value'], 2), round((float)$HTTP_GET_VARS['new_value'], 2), $text_['text']);

 

just use this instead :

 

if ($HTTP_GET_VARS['column'] == 'value') {
	 // $text_query = tep_db_query("select text, value from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $HTTP_GET_VARS['oID'] . "' and class = '" . $HTTP_GET_VARS['class'] . "'");
	 // $text_ = tep_db_fetch_array($text_query);
	 // $text = str_replace(round((float)$text_['value'], 2), round((float)$HTTP_GET_VARS['new_value'], 2), $text_['text']);
	 $text = $HTTP_GET_VARS['new_value'] . " EUR";

 

The EUR could aslo be changed with any other string...

 

And by the way, when i looked a little bit into the source, there are some realy nice security issues.... :blink: but it is late tonight...

 

byebye

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...
Anyone knows if version 2.0 already is released

 

thanks danta67

 

Just new AJAX ORDER EDITOR V2.0 here http://www.oscommerce.com/community/contri...x+orders+editor

 

Enjoy it! :lol:

Rocdy

 

Beginner in php programming and still learning from this forums.

Special thanks for Oscommerce Community Forums that help me a lot. :-)

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

Need advice for AJAX ORDER editor?

 

I have use this addon for 6 month and this usefull addon. And i got this issue when i try to create more than 3 new total it will appear like below :

 

test: Rp.1.000

test2: Rp.2.000

test3: Rp.3.000

Total: Rp.6.000

test4: Rp.4.000

test5: Rp.5.000

test6: Rp.6.000

Create New Total

 

The number test4 new total are show below the total.

 

and this is what i want :

 

test: Rp.1.000

test2: Rp.2.000

test3: Rp.3.000

test4: Rp.4.000

test5: Rp.5.000

test6: Rp.6.000

Total: Rp.21.000

Create New Total

 

 

 

and this is the code in order.php related to this create new total :

 

<?php

for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {

if (($order->totals[$i]['class'] != 'ot_subtotal') && ($order->totals[$i]['class'] != 'ot_total') && ($order->totals[$i]['class'] != 'ot_tax')) {

echo ' <tr>' . "\n" .

' <td align="right" class="smallText"><a href="java script: updateOrdersTotal(\'' . $oID . '\', \'' . $order->totals[$i]['class'] . '\', \'' . addslashes(htmlspecialchars($order->totals[$i]['title'])) . '\', \'title\')"><u>' . $order->totals[$i]['title'] . '</u></a></td>' . "\n" .

' <td align="right" class="smallText"><a href="java script: updateOrdersTotal(\'' . $oID . '\', \'' . $order->totals[$i]['class'] . '\', \'' . $order->totals[$i]['value'] . '\', \'value\')"><u>' . $order->totals[$i]['text'] . '</u></a></td>' . "\n" .

' </tr>' . "\n";

} else {

echo ' <tr>' . "\n" .

' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .

' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .

' </tr>' . "\n";

}

}

//link to create a new order_total

echo ' <tr>' . "\n" .

' <td align="right" class="smallText" colspan="2"><a href="java script: createOrdersTotal(\'' . $oID . '\')"><u>Create New Total</u></a></td>' . "\n" .

' </tr>' . "\n";

?>

 

 

and this is the $action :

 

} elseif ($action == 'orders_total_update') {

if ($HTTP_GET_VARS['column'] == 'value') {

$text_query = tep_db_query("select text, value from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $HTTP_GET_VARS['oID'] . "' and class = '" . $HTTP_GET_VARS['class'] . "'");

$text_ = tep_db_fetch_array($text_query);

$text = str_replace(round((float)$text_['value'], 2), round((float)$HTTP_GET_VARS['new_value'] , 2), $text_['text']);

tep_db_query("update " . TABLE_ORDERS_TOTAL . " set text = '" . $text . "' where orders_id = '" . $HTTP_GET_VARS['oID'] . "' and class = '" . $HTTP_GET_VARS['class'] . "'");

}

tep_db_query("update " . TABLE_ORDERS_TOTAL . " set " . $HTTP_GET_VARS['column'] . " = '" . $HTTP_GET_VARS['new_value'] . "' where orders_id = '" . $HTTP_GET_VARS['oID'] . "' and class = '" . $HTTP_GET_VARS['class'] . "'");

tep_db_update_totals($HTTP_GET_VARS['oID']);

 

//that's it, tell the administrator

//ENGLISH

echo 'Total updated.' . "\n" . 'Refresh the browser to see the changes.';

} elseif ($action == 'new_order_total') {

$sort_order_query = tep_db_query("select max(sort_order) as maxim from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $HTTP_GET_VARS['oID'] . "' and class != 'ot_total'");

$sort_order = tep_db_fetch_array($sort_order_query);

$new_sort_order = (int)$sort_order['maxim'] + 1;

 

//get the order's currency

$currency_query = tep_db_query("select currency, currency_value from " . TABLE_ORDERS . " where orders_id = '" . $HTTP_GET_VARS['oID'] . "'");

$currency = tep_db_fetch_array($currency_query);

 

$class_query = tep_db_query("select class from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $HTTP_GET_VARS['oID'] . "' and class like '%ot_extra_%'");

$classs = 'ot_extra_' . (tep_db_num_rows($class_query) + 1);

 

$new_order_total_value_txt = $currencies->format($HTTP_GET_VARS['value'], true, $currency['currency'], $currency['currency_value']);

 

tep_db_query("insert into " . TABLE_ORDERS_TOTAL . " (orders_id, title, text, value, class, sort_order) values ('" . $HTTP_GET_VARS['oID'] . "', '" . $HTTP_GET_VARS['title'] . ":', '" . $new_order_total_value_txt . "', '" . round((float)$HTTP_GET_VARS['value'], 4) . "', '" . $classs . "', '" . $new_sort_order . "')");

tep_db_update_totals($HTTP_GET_VARS['oID']);

 

//that's it, tell the administrator

//ENGLISH

echo 'Total updated.' . "\n" . 'Refresh the browser to see the changes.';

}

 

 

 

Any advice will be very appreciated.

Thanks before. laugh.gif

Edited by rocdy

Rocdy

 

Beginner in php programming and still learning from this forums.

Special thanks for Oscommerce Community Forums that help me a lot. :-)

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