Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NEW! Complete Order Editing Tool!


jhilgeman

Recommended Posts

2. The real time shipping calculations do not take Fedex module into account, no fedex quotes are displayed. Is it suppose to list all the installed shipping methods?

 

Ok, I've got this one. The problem lies with the fact that the function tep_get_countries is included in both the admin and catalog side general function files, but for some stupid reason the functions are not the same (even though they have the same name). Unfortunately you can't just make them both the same because then you break all sorts of other things.

 

So, here is how we get around this:

 

in catalog/includes/modules/shipping/fedex1.php find

	  if (defined("SHIPPING_ORIGIN_COUNTRY")) {
	 $countries_array = tep_get_countries(SHIPPING_ORIGIN_COUNTRY, true);
	 $this->country = $countries_array['countries_iso_code_2'];
   } else {
	 $this->country = STORE_ORIGIN_COUNTRY;
   }

and change it to

	  if (defined("SHIPPING_ORIGIN_COUNTRY")) {
	 $countries_array = tep_get_countries_info(SHIPPING_ORIGIN_COUNTRY, true);
	 $this->country = $countries_array['countries_iso_code_2'];
   } else {
	 $this->country = STORE_ORIGIN_COUNTRY;
   }

 

Then add the following function to both catalog/includes/functions/general.php and admin/includes/functions/general.php:

// Returns an array with countries
// TABLES: countries
  function tep_get_countries_info($countries_id = '', $with_iso_codes = false) {
 $countries_array = array();
 if (tep_not_null($countries_id)) {
   if ($with_iso_codes == true) {
	 $countries = tep_db_query("select countries_name, countries_iso_code_2, countries_iso_code_3 from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$countries_id . "' order by countries_name");
	 $countries_values = tep_db_fetch_array($countries);
	 $countries_array = array('countries_name' => $countries_values['countries_name'],
							  'countries_iso_code_2' => $countries_values['countries_iso_code_2'],
							  'countries_iso_code_3' => $countries_values['countries_iso_code_3']);
   } else {
	 $countries = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$countries_id . "'");
	 $countries_values = tep_db_fetch_array($countries);
	 $countries_array = array('countries_name' => $countries_values['countries_name']);
   }
 } else {
   $countries = tep_db_query("select countries_id, countries_name from " . TABLE_COUNTRIES . " order by countries_name");
   while ($countries_values = tep_db_fetch_array($countries)) {
	 $countries_array[] = array('countries_id' => $countries_values['countries_id'],
								'countries_name' => $countries_values['countries_name']);
   }
 }

 return $countries_array;
  }

 

Test it out- you should then be able to get FedEx Real Time Quotes working on both the admin and catalog side.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

I can't take credit for that one- it's been available as part of the MOECTOE Suite for over 3 years....

i'd never come across this version of manual order maker or realized what it was for.

after all this time....

doh! :lol:

Link to comment
Share on other sites

Hey djmonkey1

 

In the next update you make, can you please chance this in admin/edit_orders.php

From line 1300 to 1316

 

So can people see all the letters in the box, Is only the size number.

 

Thanks for a nice job you make

 

The larger the boxes, the more likely it is that the page will scroll to the side on computers with smaller screen resolutions. What I'll do in a later version is make the box width a variable that can be changed via the admin control panel.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Each products tax field is writable. Unfortunately there is no such thing as a shipping_tax field; such a field was included with earlier editions of Order Editor as a workaround but has been removed in 5.0 (and 4.0 as well I believe).

 

As for dollar amount tax total field being editable, it wouldn't matter if it was because the entry would just be overwritten by the output of the ot_tax module.

OK, so I think you are saying that there is no way that Order Editor can be used in Europe by a VAT registered company to make cross border sales to other VAT registered companies. The only workaround that I can think of is to have a discount equal to the amount of the tax. I'm not entirely sure that this is legal so I'll have to check with the tax authorities. I may bodge around this by writing a standalone invoice printing module that marries up the discount and the tax and doesn't print the tax if the two are equal. The alternative, I suppose is to modify the ot_tax module to apply zero shipping tax if the total of the product tax is zero (which roughly is what the European tax law requires). I'll have to take a look at this too.

 

Anyway, thanks very much for all the work you have done. Really nice contribution.

 

Nigel

Link to comment
Share on other sites

Hi,

 

Me again!

 

Discovered something not working in my install of this great contribution.

 

When I click 'create' in the admin panel I get this:

 

Parse error: parse error, unexpected T_REQUIRE in /home/content/W/O/R/WORLDOFMOTION/html/shop2/admin/create_order.php on line 1

 

Haven't changed the file, it's the one that came with the package.

 

Thanks again.

Link to comment
Share on other sites

Hey djmonkey1

 

It will be nice, i will wait to the update :)

 

The larger the boxes, the more likely it is that the page will scroll to the side on computers with smaller screen resolutions. What I'll do in a later version is make the box width a variable that can be changed via the admin control panel.
Link to comment
Share on other sites

Hi djmonkey1,

 

I got a couple more issues as I test the module further. By the way, Fedex module works fine. Thanks a lot.

1. When I manually create order and go to add products, the javascript doesn't work properly. It does let me select products but when I hit add to order, nothing is added and again error on the page, Line: 9. Char: 3, Error: Access is denied. However, if I refresh the page, all products are there.

If I just edit an existing order and add products to order, no problems, they added just fine.

 

2. When I manually create order, it also doesn't show all the shipping methods unless I refresh the page. No problems with existing orders.

 

3. For both, creating new order and editing an existing order. If I select products and hit Delete, then Yes to delete, nothing is deleted from order. And there is 'Unknown runtime error' on the page. However, if I refresh the page, the selected products are deleted. I use IE7.

 

4. Once the Order Totals are updated by javascript, I can't change or add anything else, like Shipping Insurance, because the field is no longer editable. By the way, what the expandable box under each field is for? If I input any additional fee there, it's just ignored by javascript.

 

5. When I edit an existing order and, for example, add Shipping Insurance to order totals, it does updated and the Value field is no longer editable but the additional fee is not added to the total.

 

6. Now as I modified the code to include tracking numbers in email, it doesn't send emails at all, with or without tracking numbers. Error on page: Object required, Line: 544, Char: 5.

In edit_orders.php I have the following html code:

<tr>
	<td class="main"><?php echo TABLE_HEADING_UPS_TRACKING; ?>     <?php echo tep_draw_textbox_field('ups_track_num', '24', '24', '', $order->info['ups_track_num'], 'id="tracking_number_ups"'); ?> <a target="_blank" href="http://wwwapps.ups.com/WebTracking/processRequest?HTMLVersion=5.0&Requester=NES&AgreeToTermsAndConditions=yes&loc=en_US&tracknum=<?php echo $order->info['ups_track_num']; ?>"> <?php echo tep_image_button('button_track.gif', 'Track Package'); ?></a></td>
  </tr>
  <div>
  <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?>
  </div>
  <tr>
	<td class="main"><?php echo TABLE_HEADING_FEDEX_TRACKING; ?>  <?php echo tep_draw_textbox_field('fedex_track_num', '24', '24', '', $order->info['fedex_track_num'], 'id="tracking_number_fedex"'); ?> <a target="_blank"
 href="http://www.fedex.com/Tracking?action=track&language=english&last_action=alttrack&ascend_header=1&cntry_code=us&initial=x&mps=y&tracknumbers=<?php echo $order->info['fedex_track_num']; ?>"> <?php echo tep_image_button('button_track.gif', 'Track Package'); ?></a></td>
  </tr>
  <div>
  <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?>
  </div>
  <tr>
	<td class="main"><?php echo TABLE_HEADING_USPS_TRACKING; ?>   <?php echo tep_draw_textbox_field('usps_track_num', '24', '24', '', $order->info['usps_track_num'], 'id="tracking_number_usps"'); ?> <a target="_blank" href="http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=<?php echo $order->info['usps_track_num']; ?>"> <?php echo tep_image_button('button_track.gif', 'Track Package'); ?></a></td>
  </tr>

In javascript.php:

function getNewComment() { //this is used for inserting new commments

   createRequest();
   var status = document.getElementById("status").value;
   var notify = document.getElementById("notify").checked;
   var notifyComments = document.getElementById("notify_comments").checked;
   var comments = encodeURIComponent(document.getElementById("comments").value);
   var tracking = document.getElementById("tracking_number_ups").value;
	var tracking = document.getElementById("tracking_number_fedex").value;
	var tracking = document.getElementById("tracking_number_usps").value;
	var url = "<?php echo FILENAME_ORDERS_EDIT_AJAX; ?>?action=insert_new_comment&oID=<?php echo $_GET['oID']; ?>&status=" + status +"¬ify=" + notify + "¬ify_comments=" + notifyComments + "&comments=" + comments + "&tracking_number_ups=" + tracking+ "&tracking_number_fedex=" + tracking+ "&tracking_number_usps=" + tracking;

	xmlHttp.open("GET", url, true);

	xmlHttp.onreadystatechange=
			function(){if(xmlHttp.readyState!=4)return;if(xmlHttp.status==200){reloadDiv('commentsBlock', xmlHttp.responseText);clearComments();}};

	xmlHttp.send(null);

  }//end function getNewComment()

In edit_orders_ajax.php:

//11. insert new comments
 if ($action == 'insert_new_comment') {

 	//orders status
	 $orders_statuses = array();
	 $orders_status_array = array();
	 $orders_status_query = tep_db_query("SELECT orders_status_id, orders_status_name 
										  FROM " . TABLE_ORDERS_STATUS . " 
										  WHERE language_id = '" . (int)$languages_id . "'");

	 while ($orders_status = tep_db_fetch_array($orders_status_query)) {
			$orders_statuses[] = array('id' => $orders_status['orders_status_id'],
										'text' => $orders_status['orders_status_name']);

			$orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name'];
		   }

  // UPDATE STATUS HISTORY & SEND EMAIL TO CUSTOMER IF NECESSARY #####

$check_status_query = tep_db_query("
					  SELECT customers_name, customers_email_address, orders_status, fedex_track_num, ups_track_num, usps_track_num, date_purchased
					  FROM " . TABLE_ORDERS . " 
					  WHERE orders_id = '" . $_GET['oID'] . "'");

$check_status = tep_db_fetch_array($check_status_query); 

 if (($check_status['orders_status'] != $_GET['status']) || (tep_not_null($_GET['comments']))) {

	tep_db_query("UPDATE " . TABLE_ORDERS . " SET
				  orders_status = '" . tep_db_input($_GET['status']) . "',
				  last_modified = date_add(now(), INTERVAL " . TIME_ZONE_OFFSET . " HOUR) WHERE orders_id = '" . $_GET['oID'] . "'");

	 // Notify Customer ?
	 /*Tracking contribution begin*/
  $customer_notified = '0';
		if (isset($_GET['notify']) && ($_GET['notify'] == 'true') & ($ups_track_num == '' & $fedex_track_num == '' & $usps_track_num == '' ) ) {
		  $notify_comments = '';
		  if (isset($_GET['notify_comments']) && ($_GET['notify_comments'] == 'true')) {
			$notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $_GET['comments']) . "\n\n<br>";
		if ($comments == null)
		 $notify_comments = '';
		  }
	   $email = 'Dear ' . $check_status['customers_name'] . ',' . "\n\n" . EMAIL_SEPARATOR . "\n" . STORE_NAME . ' ' . EMAIL_TEXT_ORDER_NUMBER . ' ' . (int)$oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "'>" .  'order_id=' . (int)$oID . "</a>\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n" . EMAIL_SEPARATOR . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]) . "\n" . EMAIL_TEXT_ORDER_STATUS . ' ' . "<a HREF='" . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY, 'order_id=' . $oID, 'SSL') . "'>" . (EMAIL_TEXT_ORDER_STATUS_LINK) . "</a> \n";

//code which replaces the <br> tags within EMAIL_TEXT_PAYMENT_INFO and EMAIL_TEXT_FOOTER with the proper \n
  $email = str_replace("\n","<br>",$email);

		  tep_mail($check_status['customers_name'], $check_status['customers_email_address'], STORE_NAME . ' ' . EMAIL_TEXT_SUBJECT_1. (int)$oID . EMAIL_TEXT_SUBJECT_2 . $orders_status_array[$status], $email, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);

		  $customer_notified = '1';
		}

	 else if (isset($_GET['notify']) && ($_GET['notify'] == 'true') & ($ups_track_num == '' or $fedex_track_num == '' or $usps_track_num == '' )) {
	  $notify_comments = '';
		if (isset($_GET['notify_comments']) && ($_GET['notify_comments'] == 'true')) {
		  $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $_GET['comments']) . "\n";
		if ($comments == null)
		  $notify_comments = '';
		}
		if ($ups_track_num == null) {
		  $ups_text = '';
		 }else{
		  $ups_text = '<b>UPS: </b>';
		  $ups_track_num_noblanks = str_replace(' ', '', $ups_track_num);
		  $ups_link = 'http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=' . $ups_track_num_noblanks . '&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package ';
		  $ups_track = '<a target="_blank" href="' . $ups_link . '"><b>' . $ups_track_num . '</b></a>';
				$ups_track_num = $ups_track_num . "\n";
		}
		if ($usps_track_num == null) {
		  $usps_text = '';
		 }else{
		  $usps_text = '<b>USPS: </b>';
		  $usps_track_num_noblanks = str_replace(' ', '', $usps_track_num);
		  $usps_link = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num_noblanks . "\n";
		  $usps_track = '<a target="_blank" href="' . $usps_link . '"><b>' . $usps_track_num . '</b></a>';
				$usps_track_num = $usps_track_num . "\n";
		}
		if ($fedex_track_num == null) {
		  $fedex_text = '';
		 }else{
		  $fedex_text = '<b>Fedex: </b>';
		  $fedex_track_num_noblanks = str_replace(' ', '', $fedex_track_num);
		  $fedex_link = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_track_num_noblanks . '&action=track&language=english&cntry_code=us';
		  $fedex_track = '<a target="_blank" href="' . $fedex_link . '"><b>' . $fedex_track_num . '</b></a>';
				$fedex_track_num = $fedex_track_num . "\n";
		}
		$email = 'Dear ' . $check_status['customers_name'] . ',' . "\n" . EMAIL_SEPARATOR . "\n" . STORE_NAME . ' ' . EMAIL_TEXT_ORDER_NUMBER . ' ' . (int)$oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "'>" .  'order_id = ' . (int)$oID . "</a>\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n" . EMAIL_SEPARATOR . "\n\n" . EMAIL_TEXT_TRACKING_NUMBER . "\n" . $ups_text . $ups_track . "\n" . $fedex_text . $fedex_track . "\n" . $usps_text . $usps_track . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]) . "\n" . EMAIL_TEXT_ORDER_STATUS . ' ' . "<a HREF='" . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY, 'order_id=' . $oID, 'SSL') . "'>" . (EMAIL_TEXT_ORDER_STATUS_LINK) . "</a> \n";

//code which replaces the <br> tags within EMAIL_TEXT_PAYMENT_INFO and EMAIL_TEXT_FOOTER with the proper \n
  $email = str_replace("\n","<br>",$email);

	   tep_mail($check_status['customers_name'], $check_status['customers_email_address'], STORE_NAME . ' ' . EMAIL_TEXT_SUBJECT_1. (int)$oID . EMAIL_TEXT_SUBJECT_2 . $orders_status_array[$status], $email, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);
	  $customer_notified = '1';
 }else if (isset($_GET['notify']) && ($_GET['notify'] == 'true') & (tep_not_null($ups_track_num) & tep_not_null($fedex_track_num) & tep_not_null($usps_track_num) ) ) {
	  $notify_comments = '';
	  $ups_text = '<b>UPS: </b>';
	  $ups_track_num_noblanks = str_replace(' ', '', $ups_track_num);
	  $ups_link = 'http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=' . $ups_track_num_noblanks . '&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=&InquiryNumber5=&TypeOfInquiryNumber=T&UPS_HTML_Version=3.0&IATA=us&Lang=en&submit=Track+Package ';
	  $ups_track = '<a target="_blank" href="' . $ups_link . '">' . $ups_track_num . '</a>';
	  $ups_track_num = $ups_track_num . "\n";
	  $usps_text = '<b>USPS: </b>';
	  $usps_track_num_noblanks = str_replace(' ', '', $usps_track_num);
	  $usps_link = 'http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=' . $usps_track_num_noblanks . "\n";
	  $usps_track = '<a target="_blank" href="' . $usps_link . '">' . $usps_track_num . '</a>';
	  $usps_track_num = $usps_track_num . "\n";
	  $fedex_text = '<b>Fedex: </b>';
	  $fedex_track_num_noblanks = str_replace(' ', '', $fedex_track_num);
	  $fedex_link = 'http://www.fedex.com/Tracking?tracknumbers=' . $fedex_track_num_noblanks . '&action=track&language=english&cntry_code=us';
	  $fedex_track = '<a target="_blank" href="' . $fedex_link . '">' . $fedex_track_num . '</a>';
	  $fedex_track_num = $fedex_track_num . "\n";
		if (isset($_GET['notify_comments']) && ($_GET['notify_comments'] == 'true')) {
		  $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $_GET['comments']) . "\n";
		 if ($comments == null)
		   $notify_comments = '';
		}
		$email = 'Dear ' . $check_status['customers_name'] . ',' . "\n" . EMAIL_SEPARATOR . "\n" . STORE_NAME . ' ' . EMAIL_TEXT_ORDER_NUMBER . ' ' . (int)$oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "'>" .  'order_id = ' . (int)$oID . "</a>\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n" . EMAIL_SEPARATOR . "\n\n" . EMAIL_TEXT_TRACKING_NUMBER . "\n" . $ups_text . $ups_track . "\n" . $fedex_text . $fedex_track . "\n" . $usps_text . $usps_track . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]) . "\n" . EMAIL_TEXT_ORDER_STATUS . ' ' . "<a HREF='" . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY, 'order_id=' . $oID, 'SSL') . "'>" . (EMAIL_TEXT_ORDER_STATUS_LINK) . "</a> \n";

//code which replaces the <br> tags within EMAIL_TEXT_PAYMENT_INFO and EMAIL_TEXT_FOOTER with the proper \n
  $email = str_replace("\n","<br>",$email);

	   tep_mail($check_status['customers_name'], $check_status['customers_email_address'], STORE_NAME . ' ' . EMAIL_TEXT_SUBJECT_1 . (int)$oID . EMAIL_TEXT_SUBJECT_2 . $orders_status_array[$status], $email, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);
	  $customer_notified = '1';
 }
/*Tracking contribution end*/

Link to comment
Share on other sites

OK, so I think you are saying that there is no way that Order Editor can be used in Europe by a VAT registered company to make cross border sales to other VAT registered companies. The only workaround that I can think of is to have a discount equal to the amount of the tax. I'm not entirely sure that this is legal so I'll have to check with the tax authorities. I may bodge around this by writing a standalone invoice printing module that marries up the discount and the tax and doesn't print the tax if the two are equal. The alternative, I suppose is to modify the ot_tax module to apply zero shipping tax if the total of the product tax is zero (which roughly is what the European tax law requires). I'll have to take a look at this too.

 

Anyway, thanks very much for all the work you have done. Really nice contribution.

 

Nigel

 

I'm not saying that at all. Theoretically you could add a "tax-exampt" checkbox to the page that if checked would zero out all tax components, or just make the tax class for shipping to '0'.

 

For instance in admin/edit_orders.php and admin/edit_orders_ajax.php if you find the code

		if (DISPLAY_PRICE_WITH_TAX == 'true') {//extract the base shipping cost or the ot_shipping module will add tax to it again
		  $module = substr($GLOBALS['shipping']['id'], 0, strpos($GLOBALS['shipping']['id'], '_'));
		  $tax = tep_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
		  $order->info['shipping_cost'] = ($order->info['shipping_cost'] / (1 + ($tax /100))); 
		  }

and after it add

		 $GLOBALS[$module]->tax_class = 0;

there will never be any shipping tax added to any order.

 

So if you put the

		 $GLOBALS[$module]->tax_class = 0;

inside an if condition that checks for some setting or condition you can get rid of shipping tax pretty easily for whichever orders you want.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Hi djmonkey1,

 

I got a couple more issues as I test the module further. By the way, Fedex module works fine. Thanks a lot.

1. When I manually create order and go to add products, the javascript doesn't work properly. It does let me select products but when I hit add to order, nothing is added and again error on the page, Line: 9. Char: 3, Error: Access is denied. However, if I refresh the page, all products are there.

If I just edit an existing order and add products to order, no problems, they added just fine.

How do you get to the add a product window? If you're being re-directed there from a page other than edit_orders.php that could be the problem. Line 9 is

  window.opener.document.edit_order.subaction.value = "add_product";

so if your window.opener doesn't have a form named edit_order it doesn't have anything to send it's information to.

 

2. When I manually create order, it also doesn't show all the shipping methods unless I refresh the page. No problems with existing orders.
Don't know. Could be, once again, the way you're getting to the page. Some variable not being set or some other such nonsense going on.

 

3. For both, creating new order and editing an existing order. If I select products and hit Delete, then Yes to delete, nothing is deleted from order. And there is 'Unknown runtime error' on the page. However, if I refresh the page, the selected products are deleted. I use IE7.
I have seen this before- the "Unknown runtime error" is basically caused by trying to do something to the HTML output of the page that IE can't handle. That's why the JavaScript function deleteRow() exists within Order Editor- to prevent this very error (it drove me nuts while I was developing this version). So, unfortunately, again, I don't know. If I was getting the error there would be something for me to look at, but I've already gotten rid of this error in IE7. At least on my computer anyway. Have you tried other browsers such as Opera and/or Firefox? Also if you've edited the table that products information is displayed in that could be effecting the JavaScript somehow.

 

4. Once the Order Totals are updated by javascript, I can't change or add anything else, like Shipping Insurance, because the field is no longer editable. By the way, what the expandable box under each field is for? If I input any additional fee there, it's just ignored by javascript.
I'm not sure what you mean by this. The expandable box is for adding new components; you have to enter the title first. If you enter the number first it will be ignored (deleting the title is how you delete a custom or otherwise editable component from the order, so if the title is blank it doesn't count as anything).

 

5. When I edit an existing order and, for example, add Shipping Insurance to order totals, it does updated and the Value field is no longer editable but the additional fee is not added to the total.
I'm not following you on this one either. If you can't get the expandable boxes to work how are you adding anything to the order totals?

 

6. Now as I modified the code to include tracking numbers in email, it doesn't send emails at all, with or without tracking numbers. Error on page: Object required, Line: 544, Char: 5.

In edit_orders.php I have the following html code:

This is much simpler than first I thought. In admin/edit_orders.php change
<span class="postcolor"><tr>
	 <td  class="main"><?php echo TABLE_HEADING_UPS_TRACKING;  ?>	 <?php echo tep_draw_textbox_field('ups_track_num', '24',  '24', '', $order->info['ups_track_num'],  'id="tracking_number_ups"'); ?> <a target="_blank"  href="http://wwwapps.ups.com/WebTracking/processRequest?HTMLVersion=5.0&Requester=NES&AgreeToTermsAndConditions=yes&loc=en_US&tracknum=<?php  echo $order->info['ups_track_num']; ?>"> <?php echo  tep_image_button('button_track.gif', 'Track Package');  ?></a></td>
   </tr>
   <div>
   <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?>
   </div>
   <tr>
	 <td  class="main"><?php echo TABLE_HEADING_FEDEX_TRACKING;  ?>  <?php echo tep_draw_textbox_field('fedex_track_num', '24',  '24', '', $order->info['fedex_track_num'],  'id="tracking_number_fedex"'); ?> <a target="_blank"
  href="http://www.fedex.com/Tracking?action=track&language=english&last_action=alttrack&ascend_header=1&cntry_code=us&initial=x&mps=y&tracknumbers=<?php  echo $order->info['fedex_track_num']; ?>"> <?php echo  tep_image_button('button_track.gif', 'Track Package');  ?></a></td>
   </tr>
   <div>
   <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?>
   </div>
   <tr>
	 <td  class="main"><?php echo TABLE_HEADING_USPS_TRACKING;  ?>   <?php echo tep_draw_textbox_field('usps_track_num', '24',  '24', '', $order->info['usps_track_num'],  'onChange="updateOrdersField(\'usps_track_num\', encodeURIComponent(this.value))"'); ?> <a target="_blank"  href="http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=<?php  echo $order->info['usps_track_num']; ?>"> <?php echo  tep_image_button('button_track.gif', 'Track Package');  ?></a></td>
   </tr></span>

to

<tr>
	 <td  class="main"><?php echo TABLE_HEADING_UPS_TRACKING;  ?>	 <?php echo tep_draw_textbox_field('ups_track_num', '24',  '24', '', $order->info['ups_track_num'],  '</span><span class="postcolor">onChange="updateOrdersField(\'ups_track_num\', encodeURIComponent(this.value))"</span><span class="postcolor">'); ?> <a target="_blank"  href="http://wwwapps.ups.com/WebTracking/processRequest?HTMLVersion=5.0&Requester=NES&AgreeToTermsAndConditions=yes&loc=en_US&tracknum=<?php  echo $order->info['ups_track_num']; ?>"> <?php echo  tep_image_button('button_track.gif', 'Track Package');  ?></a></td>
   </tr>
   <div>
   <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?>
   </div>
   <tr>
	 <td  class="main"><?php echo TABLE_HEADING_FEDEX_TRACKING;  ?>  <?php echo tep_draw_textbox_field('fedex_track_num', '24',  '24', '', $order->info['fedex_track_num'],  'onChange="updateOrdersField(\'fedex_track_num\', encodeURIComponent(this.value))"'); ?> <a target="_blank"
  href="http://www.fedex.com/Tracking?action=track&language=english&last_action=alttrack&ascend_header=1&cntry_code=us&initial=x&mps=y&tracknumbers=<?php  echo $order->info['fedex_track_num']; ?>"> <?php echo  tep_image_button('button_track.gif', 'Track Package');  ?></a></td>
   </tr>
   <div>
   <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?>
   </div>
   <tr>
	 <td  class="main"><?php echo TABLE_HEADING_USPS_TRACKING;  ?>   <?php echo tep_draw_textbox_field('usps_track_num', '24',  '24', '', $order->info['usps_track_num'],  'id="tracking_number_usps"'); ?> <a target="_blank"  href="http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=<?php  echo $order->info['usps_track_num']; ?>"> <?php echo  tep_image_button('button_track.gif', 'Track Package');  ?></a></td>
   </tr>

 

Then undo the changes you made to admin/order_editor/javascript.php and test it out.

Edited by djmonkey1

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Wow- some of the editing functions of this board really, really blow.

 

That code section should be

<tr>
        <td  class="main"><?php echo  TABLE_HEADING_UPS_TRACKING;  ?>     <?php echo  tep_draw_textbox_field('ups_track_num', '24',  '24', '',  $order->info['ups_track_num'],  'onChange="updateOrdersField(\'ups_track_num\',  encodeURIComponent(this.value))"'); ?> <a  target="_blank"  href="http://wwwapps.ups.com/WebTracking/processRequest?HTMLVersion=5.0&Requester=NES&AgreeToTermsAndConditions=yes&loc=en_US&tracknum=<?php  echo  $order->info['ups_track_num']; ?>"> <?php  echo  tep_image_button('button_track.gif', 'Track  Package');  ?></a></td>
      </tr>
      <div>
      <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?>
      </div>
      <tr>
         <td  class="main"><?php echo  TABLE_HEADING_FEDEX_TRACKING;  ?>  <?php echo  tep_draw_textbox_field('fedex_track_num', '24',  '24', '',  $order->info['fedex_track_num'],  'onChange="updateOrdersField(\'fedex_track_num\',  encodeURIComponent(this.value))"'); ?> <a target="_blank"
   href="http://www.fedex.com/Tracking?action=track&language=english&last_action=alttrack&ascend_header=1&cntry_code=us&initial=x&mps=y&tracknumbers=<?php  echo  $order->info['fedex_track_num']; ?>"> <?php  echo  tep_image_button('button_track.gif', 'Track  Package');  ?></a></td>
      </tr>
      <div>
      <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?>
      </div>
      <tr>
         <td  class="main"><?php echo  TABLE_HEADING_USPS_TRACKING;  ?>   <?php echo  tep_draw_textbox_field('usps_track_num', '24',  '24', '',  $order->info['usps_track_num'],  'onChange="updateOrdersField(\'usps_track_num\',  encodeURIComponent(this.value))"'); ?>  <a  target="_blank"  href="http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=<?php  echo  $order->info['usps_track_num']; ?>"> <?php  echo  tep_image_button('button_track.gif', 'Track  Package');  ?></a></td>
      </tr>

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

No, it didn't do anything. Once I removed the code from javascript.php, it started sending emails but no tracking numbers included. That must be something else that we forgot.

 

Once I confirm the customer for an order, I'm redirected to edit_orders.php page where I actually create an order. It uses all the functions of order editor, just the order is entered from the scratch. Although, once I refresh the page, the order is already existing and it's like modifying the existing order. And I do have window.opener.document.edit_order.subaction.value = "add_product"; in edit_orders_add_product.php.

 

To the add a product window I get from edit_orders.php. From edit_orders.php I click Add Product and window pops where I can choose products for the order. However when I click add to order, nothing happens, no products added to the order unless I refresh edit_orders.php page.

 

Regarding the Delete products function, it uses the original code of edit_orders.php. I didn't try any other browsers except for IE7 as I don't use them.

 

I appreciate your help.

Edited by Irin
Link to comment
Share on other sites

I use separate pricing for different customers.

 

Has anyone tweaked this so you can select the customer type when creating the order. This way the appropriate prices would come up. Otherwise you have to reneter the prices manually.

 

 

mark

Edited by 2dogrc
Link to comment
Share on other sites

I use separate pricing for different customers.

 

Has anyone tweaked this so you can select the customer type when creating the order. This way the appropriate prices would come up. Otherwise you have to reneter the prices manually.

 

mark

 

If you're using v5.x you can go to Admin->Configuration->Order Editor->Use Prices From Separate Pricing Per Customer->set to 'true'

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

If you're using v5.x you can go to Admin->Configuration->Order Editor->Use Prices From Separate Pricing Per Customer->set to 'true'

 

 

Great!

 

I installed the contrib..

BUT! There is always a but!

 

If i use manual order editor to make the order, then I have no problem editing the order. However, if the order is created on the website, I click "edit" and get a blank screen!

 

Also the separate pricing needs to be set in the manual account creator somewhere, so that once the order is created, the order editor will know what to do!

 

Mark

Link to comment
Share on other sites

If i use manual order editor to make the order, then I have no problem editing the order. However, if the order is created on the website, I click "edit" and get a blank screen!

 

Either you're not using v5.x or you're using it in conjunction with a manual order entry contribution and the problems you're having lie with that contribution- either way, I can't help you.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Either you're not using v5.x or you're using it in conjunction with a manual order entry contribution and the problems you're having lie with that contribution- either way, I can't help you.

I just installed the New version 5.02 I would not say i am using in conjunction. If a customer orders online, and I go into admin/orders and click edit, I get a blank screen when it pulls up admin/edit_orders.php.

 

BUT if I use a manual account creater, then this Works Perfect! All the Ajax stuff works, The add products works, it saves the modificattions.

 

Mark

Link to comment
Share on other sites

I just installed 5.02 and i haven't added any other previous contribs for order editing and i'm getting a blank page when trying to edit orders placed thru the website.

 

I turned on error reporting to see if it gave any errors... its just a blank page.

 

I opened up edit_orders.php and changed all the require (..) to include (..) and the page showed up.

 

The AJAX part is a little flaky though, when i delete a product from the order, it gets rid of the subtotal and total parts.

Edited by Vexiphne
Link to comment
Share on other sites

Ok thanks I will work on this tonight. When you say no real problem what does that mean...LoL

 

 

Upgraded to 5.0 should I uninstall 4.0.2 first or can I just install it over that?

 

Reason I ask is since 5.0 doesn't include manual order maker I didn't know if it would cause any problems.

 

-Thanks

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Upgraded to 5.0 should I uninstall 4.0.2 first or can I just install it over that?

 

Reason I ask is since 5.0 doesn't include manual order maker I didn't know if it would cause any problems.

 

-Thanks

 

I had 4.0.2 and just installed 5.0 over it. I left manual order maker installed. BUT... I did have to undo some of the 4.0.2 from some of the files (example: I had to remove shipping_method and handling_fee from some queries.) There weren't too many of these. Afterwards 5.0 seems to work very well...AND with manual order maker. I wish I documented the changes and I would have shared. I'm a programmer so it was fairly simple. But for a non-programmer it might not. HINT: Install 5.0 over 4.0.2 > You will then see some of the errors > Look back at the 4.0.2 install file and simply undo the changes to the files.

Link to comment
Share on other sites

Hello,

 

in switzerland i need accentued characters in words ex: écouter and when i wright a new status or comment, the word is écouter ...

only when in the admin box of Order Editor "Allow the use of AJAX to update order information? " is TRUE

else if AJAX is on "FALSE" all is OK?

 

Have you an idea?

 

Thank you

Link to comment
Share on other sites

I just installed the New version 5.02 I would not say i am using in conjunction. If a customer orders online, and I go into admin/orders and click edit, I get a blank screen when it pulls up admin/edit_orders.php.

 

BUT if I use a manual account creater, then this Works Perfect! All the Ajax stuff works, The add products works, it saves the modificattions.

 

Mark

 

Vexiphne just commented that he

opened up edit_orders.php and changed all the require (..) to include (..) and the page showed up

 

Try that and see what happens. Make sure to keep a backup.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

The AJAX part is a little flaky though, when i delete a product from the order, it gets rid of the subtotal and total parts.

 

That's bizarre- I've never seen that. In fact it's designed to output the subtotal, total, and any taxes if it somehow loses all the various components. Dropping just the subtotal and total doesn't make any sense.

 

What is the class value of your subtotal and total components? It should be something like ot_subtotal and ot_total.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Hello,

 

in switzerland i need accentued characters in words ex: écouter and when i wright a new status or comment, the word is écouter ...

only when in the admin box of Order Editor "Allow the use of AJAX to update order information? " is TRUE

else if AJAX is on "FALSE" all is OK?

 

Have you an idea?

 

Thank you

 

I am getting the same thing in Firefox and IE7. This appears to be a limitation of the JavaScript function encodeURIComponent. The workaround at this point is to set "Allow the use of AJAX to update order information" to false.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

I am getting the same thing in Firefox and IE7. This appears to be a limitation of the JavaScript function encodeURIComponent. The workaround at this point is to set "Allow the use of AJAX to update order information" to false.

 

Thank you, let me know if a solution was found...

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