Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NEW! Complete Order Editing Tool!


jhilgeman

Recommended Posts

Yes, in 'billing_cf' and 'billing_piva' columns of the order's table...

Both billing address than delivery address can have one.

 

Ok, it's pretty easy then, I'll show you how I added "street_address_2" and you should have no problems.

 

Just be sure to back up all your files and test out the changes on a sample order you can afford to lose data from in the event something goes wrong.

 

The first thing you need to edit, if you haven't already, is admin/includes/classes/order.php. There are a total of four arrays that you need to be concerned with: info, customer, billing, and delivery (however, you won't necessarily edit all of them). Here are mine:

 

$this->info = array('currency' => $order['currency'],
					  'currency_value' => $order['currency_value'],
					  'payment_method' => $order['payment_method'],
					  'cc_type' => $order['cc_type'],
					  'cc_owner' => $order['cc_owner'],
					  'cc_number' => $order['cc_number'],
					  'cc_expires' => $order['cc_expires'],
					  'date_purchased' => $order['date_purchased'],
					  'orders_status' => $order['orders_status'],
					  // begin UPS XML Tracking
					  'ups_track_num' => $order['ups_track_num'],
					   // end UPS XML Tracking   
					  'last_modified' => $order['last_modified'],
					  'pwa' => $order['purchased_without_account']);

  $this->customer = array('name' => $order['customers_name'],
						  'company' => $order['customers_company'],
						  'street_address' => $order['customers_street_address'],
						  // Second Address Field mod:
						  'street_address_2' => $order['customers_street_address_2'],
						  // :Second Address Field mod
						  'suburb' => $order['customers_suburb'],
						  'city' => $order['customers_city'],
						  'postcode' => $order['customers_postcode'],
						  'state' => $order['customers_state'],
						  'country' => $order['customers_country'],
						  'format_id' => $order['customers_address_format_id'],
						  'fedex_tracking' => $order['fedex_tracking'],
						  'telephone' => $order['customers_telephone'],
						  'email_address' => $order['customers_email_address']);

  $this->delivery = array('name' => $order['delivery_name'],
						  'company' => $order['delivery_company'],
						  'street_address' => $order['delivery_street_address'],
						  'street_address' => $order['delivery_street_address'],
						  // Second Address Field mod:
						  'street_address_2' => $order['delivery_street_address_2'],
						  // :Second Address Field mod
						  'suburb' => $order['delivery_suburb'],
						  'city' => $order['delivery_city'],
						  'postcode' => $order['delivery_postcode'],
						  'state' => $order['delivery_state'],
						  'country' => $order['delivery_country'],
						  'format_id' => $order['delivery_address_format_id']);

  $this->billing = array('name' => $order['billing_name'],
						 'company' => $order['billing_company'],
						 'street_address' => $order['billing_street_address'],
						 // Second Address Field mod:
						  'street_address_2' => $order['billing_street_address_2'],
						  // :Second Address Field mod
						 'suburb' => $order['billing_suburb'],
						 'city' => $order['billing_city'],
						 'postcode' => $order['billing_postcode'],
						 'state' => $order['billing_state'],
						 'country' => $order['billing_country'],
						 'format_id' => $order['billing_address_format_id']);

 

If you compare this code to yours (mine starts at about line 47), you'll see I've added a number of lines such as street_address_2, ups_track_num, etc. The important thing to remember when adding lines here is that the first part has to be unique to that array, while the second part has to be exactly what's in the database. For instance in

 'street_address_2' => $order['billing_street_address_2'],

"street_address_2" can be anything, whatever you want to call that field, while "billing_street_address_2" is the actual field in the database that we're referring to. Yours could be something like

 'piva' => $order['billing_piva'],

in the billing array,

 'piva' => $order['delivery_piva'],

in the delivery array, etc. You can add any number of fields into these arrays, as many fields as you have in the orders table, just make sure you add them in the middle somewhere, don't edit the last line of each array unless you know what you're doing. Also, be aware of what you enter here because you'll need to know it in the last step of these instructions.

 

Once you've got the orders class taken care of, there are two things you need to add information to in the admin/edit_orders.php file. The first thing is the $UpdateOrders array that starts at about line 56 after

// 1.1 UPDATE ORDER INFO #####

This array somewhat mirrors the arrays in the order class except there are three sections instead of four. My first section looks like this:

$UpdateOrders = "UPDATE " . TABLE_ORDERS . " SET 
	customers_name = '" . tep_db_input(stripslashes($_POST['update_customer_name'])) . "',
	customers_company = '" . tep_db_input(stripslashes($_POST['update_customer_company'])) . "',
	customers_street_address = '" . tep_db_input(stripslashes($_POST['update_customer_street_address'])) . "',
	customers_street_address_2 = '" . tep_db_input (stripslashes($_POST['update_customer_street_address_2'])) . "',
	customers_suburb = '" . tep_db_input(stripslashes($_POST['update_customer_suburb'])) . "',
	customers_city = '" . tep_db_input(stripslashes($_POST['update_customer_city'])) . "',
	customers_state = '" . tep_db_input(stripslashes($_POST['update_customer_state'])) . "',
	customers_postcode = '" . tep_db_input($_POST['update_customer_postcode']) . "',
	customers_country = '" . tep_db_input(stripslashes($_POST['update_customer_country'])) . "',
	ups_track_num = '" . tep_db_input($_POST['update_ups_track_num']) . "',
	customers_telephone = '" . tep_db_input($_POST['update_customer_telephone']) . "',
	customers_email_address = '" . tep_db_input($_POST['update_customer_email_address']) . "'";

 

Once again you can see that a number of additional lines have been added such as

customers_street_address_2 = '" . tep_db_input (stripslashes($_POST['update_customer_street_address_2'])) . "',

The important thing to note here is that the first section is the exact name of the field in the database, while the second section represents how you're going to refer to the input field in the final step of this process. For example in the billing section you would add a line like

billing_piva = '" . tep_db_input (stripslashes($_POST['update_billing_piva'])) ."',

Note that the second variable has to start with "update_" or it won't work, and once again you have to be aware of what you've entered here because you'll use it in the final step.

 

The final step is to edit the html of the actual form so you can have real input fields to deal with. As an example after

<tr class="dataTableProducts">
<td class="main"><b><?php echo ENTRY_ADDRESS; ?>: </b></td>
<td><span class="main"><input name="update_customer_street_address" size="30" value="<?php echo tep_html_quotes($order->customer['street_address']); ?>" /></span></td>
<td> </td>
<td><span class="main"><input name="update_delivery_street_address" size="30" value="<?php echo tep_html_quotes($order->delivery['street_address']); ?>" /></span></td>
<td> </td>
<td><span class="main"><input name="update_billing_street_address" size="30" value="<?php echo tep_html_quotes($order->billing['street_address']); ?>" /></span></td>
 </tr>

I've added

<tr class="dataTableProducts">
<td class="main"><b><?php echo ENTRY_ADDRESS_2; ?>: </b></td>
<td><span class="main"><input name="update_customer_street_address_2" size="30" value="<?php echo tep_html_quotes($order->customer['street_address_2']); ?>"></span></td>
<td> </td>
<td><span class="main"><input name="update_delivery_street_address_2" size="30" value="<?php echo tep_html_quotes($order->delivery['street_address_2']); ?>"></span></td>
<td> </td>
<td><span class="main"><input name="update_billing_street_address_2" size="30" value="<?php echo tep_html_quotes($order->billing['street_address_2']); ?>"></span></td>
 </tr>

 

The input names are important here; each one has to be unique, and each one has to match up with one of the lines you added in the previous step. Just as importantly, the information after tep_html_quotes has to match up with what you added to the order class for that field. For instance

billing_piva = '" . tep_db_input (stripslashes($_POST['update_billing_piva'])) ."',

corresponds to

<td><span class="main"><input  name="update_billing_piva" size="30" value="<?php echo  tep_html_quotes($order->billing['piva']);  ?>"></span></td>

 

These are pretty good general instructions (I've been meaning to write instructions like this to include with the contribution so that's why I wrote this post the way I did) and they should get you started if not enable you to make all the necessary changes.

 

Just be sure to back up all your files and test out the changes on a sample order you can afford to lose data from in the event something goes wrong.

 

If you have any questions or run into any problems feel free to post here.

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

These are pretty good general instructions (I've been meaning to write instructions like this to include with the contribution so that's why I wrote this post the way I did) and they should get you started if not enable you to make all the necessary changes.

Great!! You have been so clear and friendly, also for an Italian user as me, that doesn't speak English very well...

I added my new 2 fields (only on billing address) and these go well!!

 

Thank you very much, I hope this post will help other Italian users as me.

Link to comment
Share on other sites

It i s not calculating tax on taxable goods. I setup the tax class, tax zone, tax rate, but it is not adding taxes to the order. In admin->cusomter->order->Edit it shows "tax%" with no values, no amount after it, neither.

 

This not about charging tax on shipping, it is not charging tax on taxable goods. I am pretty sure that I have setup the OSC tax zone, and tax rate correctly. Somehow, it is not working.

 

Please help, thank you in advance!

Link to comment
Share on other sites

It i s not calculating tax on taxable goods. I setup the tax class, tax zone, tax rate, but it is not adding taxes to the order. In admin->cusomter->order->Edit it shows "tax%" with no values, no amount after it, neither.

 

This not about charging tax on shipping, it is not charging tax on taxable goods. I am pretty sure that I have setup the OSC tax zone, and tax rate correctly. Somehow, it is not working.

 

Please help, thank you in advance!

 

 

Never mind, problem solved!!! problem is in state abbreviation and fully spelled out

Link to comment
Share on other sites

today i needed to modify a user's purchase while using a currency other than usd/default site currency, so i added my edits to modify someone's currency selection to the contributions:

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

most probably won't need this, so i kept it separate from the full package.

 

 

 

has anybody found the ability to use the 'add product' selection into a SEARCH BOX, rather than a pull down menu from categories/subcategories -> product?

 

 

just searching the product name could solve a lot of loading time if you have a lot of categories & subcategories :)

Link to comment
Share on other sites

today i needed to modify a user's purchase while using a currency other than usd/default site currency, so i added my edits to modify someone's currency selection to the contributions:

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

most probably won't need this, so i kept it separate from the full package.

Great mod, thanks!
has anybody found the ability to use the 'add product' selection into a SEARCH BOX, rather than a pull down menu from categories/subcategories -> product?

 

just searching the product name could solve a lot of loading time if you have a lot of categories & subcategories :)

 

This is an interesting idea. Do you mean it would be a drop down menu of all products and as you type it highlights the first matching result?

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 actually hadn't thought of that, but it makes more sense than what i initially had in mind :lol:

 

 

here's what i think would be ideal:

 

on edit_orders.php -> add product -> search box to type full or partial item title, so searching "blue widgets" will return stuff like:

dark blue widget

blue widget

light blue widget

super blue widget

 

...in a pull down menu, selecting the first product, like you said

Link to comment
Share on other sites

i actually hadn't thought of that, but it makes more sense than what i initially had in mind :lol:

 

 

here's what i think would be ideal:

 

on edit_orders.php -> add product -> search box to type full or partial item title, so searching "blue widgets" will return stuff like:

dark blue widget

blue widget

light blue widget

super blue widget

 

...in a pull down menu, selecting the first product, like you said

 

Here's something interesting I've come across:

 

<html>
<head>
<title>Searching a Dropdown List</title>
<script type="text/javascript">
	function searchDropdown(searchStr,ddObj) {
		var index = ddObj.getElementsByTagName("option");
		for(var i = 0; i < index.length; i++) {
			if(index[i].firstChild.nodeValue.toLowerCase().substring(0,searchStr.length) == searchStr.toLowerCase()) {
				index[i].selected = true;
				break;
			}
		}
	}
</script>
</head>
<body>
<form>
	<input type="text" name="search" onkeyup="searchDropdown(this.value,this.parentNode.dd);" />
	<select name="dd">
		<option>Andrew Lesnie</option>
		<option>Andy Serkis</option>
		  <option>Barrie M. Osborne</option>
		  <option>Bernard Hill</option>
		  <option>Billy Boyd</option>
		  <option>Bob Weinstein</option>
		  <option>Cate Blanchett</option>
		  <option>Christopher Lee</option>
		  <option>David Wenham</option>
		  <option>Dominic Monaghan</option>
		  <option>Elijah Wood</option>
		  <option>Enya</option>
		  <option>Fran Walsh</option>
		  <option>Grant Major</option>
		  <option>Harvey Weinstein</option>
		  <option>Howard Shore</option>
		  <option>Hugo Weaving</option>
		<option>Ian Holm</option>
		  <option>Ian McKellen</option>
		  <option>J.R.R. Tolkien</option>
		  <option>John Rhys-Davies</option>
		  <option>Karl Urban</option>
		<option>Liv Tyler</option>
		<option>Mark Ordesky</option>
		  <option>Marton Csokas</option>
		  <option>Michael Lynne</option>
		  <option>Miranda Otto</option>
		  <option>Ngila Dickson</option>
		  <option>Orlando Bloom</option>
		  <option>Peter Jackson</option>
		<option>Philippa Boyens</option>
		  <option>Robert Shaye</option>
		  <option>Sean Astin</option>
		  <option>Sean Bean</option>
		  <option>Tim Sanders</option>
		  <option>Viggo Mortensen</option>
	</select>
</form>
</body>
</html>

 

Use that code to make a new html page and see if that would work for you (seems like the best of both worlds to me).

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

Here's something interesting I've come across:

 

Use that code to make a new html page and see if that would work for you (seems like the best of both worlds to me).

 

Here's how to implement this into Order Editor:

 

at line 765 find

<script type="text/javascript" src="includes/javascript/overlib_mini.js"><!-- overLIB (c) Erik Bosrup --></script>

and add directly below it

<script type="text/javascript">
	function searchDropdown(searchStr,xid) {
		var ddObj = document.getElementById(xid);
		var index = ddObj.getElementsByTagName('option');
		for(var i = 0; i < index.length; i++) {
			if(index[i].firstChild.nodeValue.toLowerCase().substring(0,searchStr.length) == searchStr.toLowerCase()) {
				index[i].selected = true;
				break;
			}
		}
	}
</script>

 

Then at line 1912 find

echo ' ' . tep_draw_pull_down_menu('add_product_categories_id', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');

and change it to

echo '<input type="text" name="search" onKeyUp="searchDropdown(this.value,\'apcid\');" />';
		echo ' ' . tep_draw_pull_down_menu('add_product_categories_id', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();" id="apcid"');

 

Then find at line 1925

echo '<td class="dataTableContent" valign="top"><select name="add_product_products_id" onChange="this.form.submit();">';

and change it to

echo '<td class="dataTableContent" valign="top">
	   <input type="text" name="search" onKeyUp="searchDropdown(this.value,\'appid\');" />
	   <select name="add_product_products_id" onChange="this.form.submit();" id="appid">';

 

Then find at line 1932

$ProductOptions .= "<option value='$ProductID'> $ProductName\n";

and change it to

$ProductOptions .= "<option value='$ProductID'>$ProductName\n";

(this last change is subtle but vital)

 

Note this doesn't work with subcategories, just categories and product names (with that last change). It's a problem with the spaces in front of the subcategory names- the javascript can't read them.

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,

 

I have installed PayPal IPN 3.1.5 and would like to install order editor 2.6.3

 

But there is some overlapping codes and would like to seek your advice:

 

First part:

original:

<td class="pageHeading" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action','referer'))) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td>

 

replacement:

<td class="pageHeading" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS_EDIT, 'oID=' . $_GET['oID']) . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $_GET['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $_GET['oID']) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action','referer'))) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a> '; ?></td>

 

second part:

original:

$order_query = tep_db_query("select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified, customers_id, payment_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");

 

replacement:

$order_query = tep_db_query("select * from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");

 

 

third part:

$index = 0;

 

//begin PayPal_Shopping_Cart_IPN

$orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price, products_id from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");

//end PayPal_Shopping_Cart_IPN

 

while ($orders_products = tep_db_fetch_array($orders_products_query)) {

$this->products[$index] = array('qty' => $orders_products['products_quantity'],

 

//begin PayPal_Shopping_Cart_IPN

'id' => $orders_products['products_id'],

'orders_products_id' => $orders_products['orders_products_id'],

//end PayPal_Shopping_Cart_IPN

 

'name' => $orders_products['products_name'],

'model' => $orders_products['products_model'],

'tax' => $orders_products['products_tax'],

'price' => $orders_products['products_price'],

'final_price' => $orders_products['final_price']);

 

$subindex = 0;

 

//begin PayPal_Shopping_Cart_IPN

$attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix, products_options_id, products_options_values_id from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'");

//end PayPal_Shopping_Cart_IPN

 

if (tep_db_num_rows($attributes_query)) {

while ($attributes = tep_db_fetch_array($attributes_query)) {

$this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'],

 

//begin PayPal_Shopping_Cart_IPN

'option_id' => $attributes['products_options_id'],

'value_id' => $attributes['products_options_values_id'],

//end PayPal_Shopping_Cart_IPN

 

'value' => $attributes['products_options_values'],

'prefix' => $attributes['price_prefix'],

'price' => $attributes['options_values_price']);

 

$subindex++;

}

}

$index++;

}

}

}

 

 

replacement:

$countryid = tep_get_country_id($this->delivery["country"]);

$zoneid = tep_get_zone_id($countryid, $this->delivery["state"]);

 

$index = 0;

 

//modifed for Order Editor 2.4, Products Description, and PayPal IPN

$orders_products_query = tep_db_query("

select

op.orders_products_id,

op.products_id,

op.products_name,

op.products_model,

op.products_price,

op.products_tax,

op.products_quantity,

op.final_price,

p.products_tax_class_id,

pd.products_description

from " . TABLE_ORDERS_PRODUCTS . " op

join " . TABLE_PRODUCTS_DESCRIPTION . " pd

on op.products_id = p.products_id

join " . TABLE_PRODUCTS . " p

on op.products_id = p.products_id

where orders_id = '" . (int)$order_id . "'");

 

while ($orders_products = tep_db_fetch_array($orders_products_query)) {

$this->products[$index] = array('qty' => $orders_products['products_quantity'],

'id' => $orders_products['products_id'],

'name' => $orders_products['products_name'],

'model' => $orders_products['products_model'],

'tax' => $orders_products['products_tax'],

'description' => $orders_products['products_description'],

'tax_description' => tep_get_tax_rates_description($orders_products['products_tax_class_id']),

'price' => $orders_products['products_price'],

'final_price' => $orders_products['final_price'],

'orders_products_id' => $orders_products['orders_products_id']);

 

$subindex = 0;

$attributes_query = tep_db_query("select * from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'");

if (tep_db_num_rows($attributes_query)) {

while ($attributes = tep_db_fetch_array($attributes_query)) {

$this->products[$index]['attributes'][$subindex] =

array('option' => $attributes['products_options'],

'value' => $attributes['products_options_values'],

'option_id' => $attributes['products_options_id'],

'value_id' => $attributes['products_options_values_id'],

'prefix' => $attributes['price_prefix'],

'price' => $attributes['options_values_price'],

'orders_products_attributes_id' => $attributes['orders_products_attributes_id']);

 

$subindex++;

}

}

$index++;

}

}

}

//End Order Editor, Products Description and PayPal IPN

?>

 

 

Can you please advise me if there is any problem with the replacement codes? I have tried it and ms2.2 returns with a blank screen(i can only see the side navigation on the left).

 

Thanks a million!!

Link to comment
Share on other sites

Is it hard to make Order Editor support CCGV(trad)/CCGV? Discount Coupons are listed in Order Editor but not as a minus value. I suppose it will add the coupon if clicking update instead of letting it be withdrawed. I want my sales report to be correct.

 

I would be very grateful to know how to add my shipping and payment costs in the right way too, and not just displaying them in the order editor.

Edited by Fredrik.r
Link to comment
Share on other sites

Is it hard to make Order Editor support CCGV(trad)/CCGV? Discount Coupons are listed in Order Editor but not as a minus value. I suppose it will add the coupon if clicking update instead of letting it be withdrawed. I want my sales report to be correct.

 

I would be very grateful to know how to add my shipping and payment costs in the right way too, and not just displaying them in the order editor.

 

It is not difficult. If you search this thread for "ot_coupon" and "ot_payment" you will find many people with similar questions/issues and the solutions that I posted for them. You should be able to use this information to modify Order Editor to work with CCGV.

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,

 

I have installed PayPal IPN 3.1.5 and would like to install order editor 2.6.3

 

But there is some overlapping codes and would like to seek your advice:

 

Can you please advise me if there is any problem with the replacement codes? I have tried it and ms2.2 returns with a blank screen(i can only see the side navigation on the left).

 

Thanks a million!!

 

The only issue I can see is that the code you're referencing comes from two different files. The "first part" is from admin/orders.php and the rest is from admin/includes/classes/order.php. If you have all this code in the same file, that might be your problem.

 

Also when you're posting code it's much easier to read if you wrap it in "Code" tags. When you're typing a post, just above the text area there is a button with a "#" symbol in it. If you hit that button open and closing "Code" tags will appear and you can enter your code in the middle.

 

Example code

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 only issue I can see is that the code you're referencing comes from two different files. The "first part" is from admin/orders.php and the rest is from admin/includes/classes/order.php. If you have all this code in the same file, that might be your problem.

 

Also when you're posting code it's much easier to read if you wrap it in "Code" tags. When you're typing a post, just above the text area there is a button with a "#" symbol in it. If you hit that button open and closing "Code" tags will appear and you can enter your code in the middle.

 

Example code

 

Hi,

 

Thank you for your advice.

 

The first part indeed come from: admin/orders.php and the rest come from: admin/includes/classes/order.php

 

However, it still doesn't work.

 

Any more advice?

 

thanks

Link to comment
Share on other sites

Hi,

 

Thank you for your advice.

 

The first part indeed come from: admin/orders.php and the rest come from: admin/includes/classes/order.php

 

However, it still doesn't work.

 

Any more advice?

 

thanks

 

What page shows up blank?

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

only a blank page except for the header and the left navigation bar

 

thanks

 

The entire admin is like this? Or only a certain page?

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 entire admin is like this? Or only a certain page?

i can see this page without a problem:

http://www.xxx.com/admin/orders.php

 

this page basically shows a summary of all orders that i have. from here, when i try to click on "details", invoices", "packing slip" and "edit", i can only see a blank page except for the side bar and the header. one thing, the "delete" button on the same page works without a problem though

 

thank you

Link to comment
Share on other sites

i can see this page without a problem:

http://www.xxx.com/admin/orders.php

 

this page basically shows a summary of all orders that i have. from here, when i try to click on "details", invoices", "packing slip" and "edit", i can only see a blank page except for the side bar and the header. one thing, the "delete" button on the same page works without a problem though

 

thank you

 

When you mouse over these buttons what shows up in the status bar at the bottom of your browser window?

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

When you mouse over these buttons what shows up in the status bar at the bottom of your browser window?

 

When I mouse over the button 'details', this is what i seen in the status bar:

http://xxx.com/admin/orders.php?selected_b...amp;action=edit

 

For 'delete'

http://xxx.com/admin/orders.php?selected_b...p;action=delete

 

For others:

http://xxx.com/admin/invoice.php?oID=106

http://xxx.com/admin/packingslip.php?oID=106

http://xxx.com/admin/edit_orders.php?oID=106

Link to comment
Share on other sites

 

That's pretty weird, but it's most likely a problem with admin/includes/classes/order.php. Try uploading your backup copy or the copy of it that came with either of the contributions to see if you get different results. If you had even one error that would be something, but a blank page isn't much to go on.

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 use the time offset contrib, any ideas how i can adapt the update the order status to reflect this.

 

this is what is used when the order is processed

date_purchased' => 'date_add(now(), INTERVAL ' . TIME_ZONE_OFFSET . ' HOUR)',

 

Any ideas?

D?j? vu:

 

Change
tep_db_query("UPDATE " . TABLE_ORDERS . " SET 
				  orders_status = '" . tep_db_input($_POST['status']) . "', 
				  last_modified = now() 
				  WHERE orders_id = '" . (int)$oID . "'");

 

to

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

 

and then change

tep_db_query("INSERT into " . TABLE_ORDERS_STATUS_HISTORY . " 
		(orders_id, orders_status_id, date_added, customer_notified, comments) 
		values ('" . tep_db_input($_GET['oID']) . "', 
			'" . tep_db_input($_POST['status']) . "', 
			now(), 
			" . tep_db_input($customer_notified) . ", 
			'" . tep_db_input($_POST['comments'])  . "')");
		}

 

to

tep_db_query("INSERT into " . TABLE_ORDERS_STATUS_HISTORY . " 
		(orders_id, orders_status_id, date_added, customer_notified, comments) 
		values ('" . tep_db_input($_GET['oID']) . "', 
			'" . tep_db_input($_POST['status']) . "', 
			date_add(now(), INTERVAL '" . TIME_ZONE_OFFSET . "' HOUR),
			" . tep_db_input($customer_notified) . ", 
			'" . tep_db_input($_POST['comments'])  . "')");
		}

 

and see how that goes.

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

is there a way for me to add a order to a customers account?

 

reason being is i use paypal, and sometimes paypal doesnt send the customer back to the cart if they dont click the return to merchant button, and by not doing that, i am not able to fully see the details of the order, so if i could just add a order to a customers account, i could better assist them and myself in fulfilling the order, instead of waiting for a response from an email i have to send them asking me to detail what they just purchased.

Link to comment
Share on other sites

is there a way for me to add a order to a customers account?

 

reason being is i use paypal, and sometimes paypal doesnt send the customer back to the cart if they dont click the return to merchant button, and by not doing that, i am not able to fully see the details of the order, so if i could just add a order to a customers account, i could better assist them and myself in fulfilling the order, instead of waiting for a response from an email i have to send them asking me to detail what they just purchased.

 

You could use Recover Cart Sales and Attitude Simple Manual Order Entry.

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

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