Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NEW! Complete Order Editing Tool!


jhilgeman

Recommended Posts

Hello,

 

I started to do an upgrade and ran the following sql commands in the database:

 

DELETE FROM configuration WHERE configuration_key = "DISPLAY_PAYMENT_METHOD_DROPDOWN";

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- Display Payment Method dropdown?', 'ORDER_EDITOR_PAYMENT_DROPDOWN', 'true', 'Based on this selection Order Editor will display the payment method as a dropdown menu (true) or as an input field (false).', '1', '95', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- Display Shipping Method dropdown?', 'ORDER_EDITOR_SHIPPING_DROPDOWN', 'true', 'Based on this selection Order Editor will display the shipping method as a dropdown menu (true) or as an input field (false).', '1', '96', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- use Separate Pricing Per Customer?', 'ORDER_EDITOR_USE_SPPC', 'false', 'This should be set to true only if SPPC is installed.', '1', '97', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- select a tax class for shipping fees', 'ORDER_EDITOR_DEFAULT_TAX_CLASS', '0', 'Order Editor will asses tax on shipping as being a part of this tax class.', '1', '98', now(), now(), 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(');

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- select your credit card payment method', 'ORDER_EDITOR_CREDIT_CARD', 'Credit Card', 'Order Editor will display the credit card fields when this payment method is selected.', '1', '99', now(), now(), NULL, 'tep_cfg_pull_down_payment_methods(');

 

 

but after trying the modifications and having some problems, I deleted all the changes and used the database that I had backeup up and undid everything. BUT the config menu in Admin still maintains the 4 entries it made with the sql commands.

 

How can I "undo " that ?

 

dca

Link to comment
Share on other sites

Hi djmonkey1,

 

I just updated to the v3.0. I have one question: what do I need to change in order to populate in shipping method dropdown the shipping methods defined in orders_ship_methods table instead of showing all available shipping modules?

 

Thanks.

Link to comment
Share on other sites

Hello

 

First of all, greetings for the excellent job!!

 

I had installed version 2.6.4 and it worked very well.

I decided to upgrade to version 3.0 on top of previous one but it is not working now:

 

once trying editing any order -no matter which one- I get a clean page.

 

Where is the error?

Should I undo all 2.6.4 installations steps before installing version 3.0.0 or I am missing something?

 

Thanks

Link to comment
Share on other sites

Hello

 

First of all, greetings for the excellent job!!

 

I had installed version 2.6.4 and it worked very well.

I decided to upgrade to version 3.0 on top of previous one but it is not working now:

 

once trying editing any order -no matter which one- I get a clean page.

 

Where is the error?

Should I undo all 2.6.4 installations steps before installing version 3.0.0 or I am missing something?

 

Thanks

 

I installed "over" 2.9.2 and the upgrade was 100% successful. It is very important to run the sql command from UPGRADES.TXT before following INSTALL.TXT starting at step 2 (do NOT do step one, it's a NON-UPGRADE sql command).

 

Anthony

Link to comment
Share on other sites

Hello,

 

I started to do an upgrade and ran the following sql commands in the database:

 

but after trying the modifications and having some problems, I deleted all the changes and used the database that I had backeup up and undid everything. BUT the config menu in Admin still maintains the 4 entries it made with the sql commands.

 

How can I "undo " that ?

 

dca

 

Run the sql_uninstall.sql file.

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 just updated to the v3.0. I have one question: what do I need to change in order to populate in shipping method dropdown the shipping methods defined in orders_ship_methods table instead of showing all available shipping modules?

 

Thanks.

 

I'm not familiar with that table. The code that creates/controls the shipping method menu is

		} elseif (($TotalDetails["Class"] == "ot_shipping") && (ORDER_EDITOR_SHIPPING_DROPDOWN == 'true')) {

	//shipping method dropdown?
		// Get list of all payment modules available
	  $enabled_shipping = array();
	  $shipping_directory = DIR_FS_CATALOG_MODULES . 'shipping/';
	  $shipping_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));

	  if ($dir = @dir($shipping_directory)) {
		while ($file = $dir->read()) {
		  if (!is_dir( $shipping_directory . $file)) {
			if (substr($file, strrpos($file, '.')) == $shipping_extension) {
			  $shipping_array[] = $file;
			}
		  }
	   }
   sort($shipping_array);
  $dir->close();
 }

 // For each available shipping module, check if enabled
 for ($i=0, $n=sizeof($shipping_array); $i<$n; $i++) {
$file = $shipping_array[$i];

include(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/shipping/' . $file);
include($shipping_directory . $file);

$class = substr($file, 0, strrpos($file, '.'));
if (tep_class_exists($class)) {
  $module = new $class;
  if ($module->check() > 0) {
	// If module enabled create array of titles
	  $enabled_shipping[] = array('id' => $module->title, 'text' => $module->title . ':');

	//if the shipping method is the same as the payment module title then don't add it to dropdown menu
	if (($module->title == $TotalDetails["Name"]) ||($module->title . ':' == $TotalDetails["Name"])) {
		$shippingMatchExists='true';	
	}
  }
  }
}
	 //in case the shipping method found in db is not the same as the shipping module title then make it part of the dropdown array or else it cannot be the selected default value
	if ($shippingMatchExists !='true') {
	$enabled_shipping[] = array('id' => $TotalDetails["Name"], 'text' => $TotalDetails["Name"]); }

	   $enabled_shipping[] = array('id' => 'Other', 'text' => 'Other:');	
	//draw the dropdown menu for shipment methods and default to the order value
		  echo ' <tr>' . "\n";
		echo ' <td align="right" class="' . $TotalStyle . '">' . "\n";
		echo tep_draw_pull_down_menu('update_totals[' . $TotalIndex . '][title]', $enabled_shipping, $TotalDetails["Name"], 'style="width:' . $max_length . '"'); 
		echo ' </td>' . "\n";
		echo ' <td align="right" class="' . $TotalStyle . '">' . "\n";
		echo ' <input name="update_totals[' . $TotalIndex . '][value]" size="10" value="' . $TotalDetails["Price"] . '" id="' . 
		$id . '" onKeyUp="getTotals(\'shipping\', \'' . $default_tax_name . '\')">' . "\n";

echo ' <input type="hidden" name="update_totals[' . $TotalIndex . '][class]" value="' . $TotalDetails["Class"] . '">' . "\n";
echo ' <input type="hidden" name="update_totals[' . $TotalIndex . '][total_id]" value="' . $TotalDetails["TotalID"] . '">' . "\n";

	  echo ' <td align="right" class="' . $TotalStyle . '"><b>' . tep_draw_separator('pixel_trans.gif', '1', '17') . '</b>' . "\n";
	  echo '</td></tr>' . "\n";

	} else { //no shipping dropdown, the other total components are editable

 

You could customize that code to work with your site or you could just disable the shipping method dropdown all together.

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

 

First of all, greetings for the excellent job!!

 

I had installed version 2.6.4 and it worked very well.

I decided to upgrade to version 3.0 on top of previous one but it is not working now:

 

once trying editing any order -no matter which one- I get a clean page.

 

Where is the error?

Should I undo all 2.6.4 installations steps before installing version 3.0.0 or I am missing something?

 

Thanks

 

What page on your server is your browser pointing to when you see the clean page? It should be something like

admin/edit_orders.php?oID=2&action=edit

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 installed "over" 2.9.2 and the upgrade was 100% successful. It is very important to run the sql command from UPGRADES.TXT before following INSTALL.TXT starting at step 2 (do NOT do step one, it's a NON-UPGRADE sql command).

 

Anthony

 

Yes those configuration values have been correctly inserted in database, but edit_orders.php shows nothing!

As I started from version 2.6.4, perhaps should I make some extra step up to v3.0.0?

Link to comment
Share on other sites

What page on your server is your browser pointing to when you see the clean page? It should be something like
admin/edit_orders.php?oID=2&action=edit

 

Thanks for your reply!

 

I get a blank page in both next cases:

admin/edit_orders.php?oID=2&action=edit

admin/edit_orders.php?oID=2

Link to comment
Share on other sites

Ok Great, Thanks for the fast response. Can any one point me in the right direction on how to get the shipping Drop down to change the price. I use all flat rate shipping. :D

 

Check out MOECTOE Suite Public Betas, it has the functionality that you're looking for. I'm currently working on Order Editor 4.0 using the order editor that comes with MOECTOE as the base file. There are a huge number of similarities between the two files already; you may be able to get a hybrid working that does what 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

Thanks for your reply!

 

I get a blank page in both next cases:

admin/edit_orders.php?oID=2&action=edit

admin/edit_orders.php?oID=2

 

But you see the blank page only after pressing "update"? How do you get to the order editor page in the first place?

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

But you see the blank page only after pressing "update"? How do you get to the order editor page in the first place?

 

I have never seen the edit_orders page.

From orders.php, I select one order, press button "edit", and it takes me to the blank page

admin/edit_orders.php?oID=3

 

On the other hand, if I write the link admin/edit_orders.php?oID=3&action=edit I get same blank page

Link to comment
Share on other sites

Here's a new quirk for me...

 

I use a Discount Coupon contribution. During checkout, when a discount code is used, it subtracts the value of the discount from the purchase BEFORE TAXES. When I open Order Edit, it appears that the discount coupon entry applies the discount AFTER TAXES. Therefore, there is a difference in totals between the actual checkout and the total amount indicated in Order Editor equal to the taxes on the value of the discount coupon.

 

Any way to resolve?

 

Anthony

Link to comment
Share on other sites

I have never seen the edit_orders page.

From orders.php, I select one order, press button "edit", and it takes me to the blank page

admin/edit_orders.php?oID=3

 

On the other hand, if I write the link admin/edit_orders.php?oID=3&action=edit I get same blank page

 

 

Have you tried re-uploading the file admin/edit_orders.php?

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 a new quirk for me...

 

I use a Discount Coupon contribution. During checkout, when a discount code is used, it subtracts the value of the discount from the purchase BEFORE TAXES. When I open Order Edit, it appears that the discount coupon entry applies the discount AFTER TAXES. Therefore, there is a difference in totals between the actual checkout and the total amount indicated in Order Editor equal to the taxes on the value of the discount coupon.

 

Any way to resolve?

 

Anthony

 

Could you please be more specific, ie post actual numbers, what they should be, what they are, etc.

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

Could you please be more specific, ie post actual numbers, what they should be, what they are, etc.

 

As processed during checkout:

 

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

1 x MRX - PCAS (MRX) = $549.00

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

Discount Coupon xxxxxxxx applied: -$30.00

Sub-Total: $519.00

Shipping (Shipping to Ontario, Canada ): $19.00

Tax: $72.66

Total: $610.66

 

The tax is 14% of $519.00 (the AFTER DISCOUNT purchase price).

 

 

 

Below is what is found in the Order Editor...

 

Discount, Shipping and Total

 

Discount Coupon xxxxxxxxx applied: -30.00

ONT PST 8.0% + GST: 76.86

Sub-Total: 549.00

Shipping:Shipping (Shipping to Ontario, Canada ): 19.00

Total: 614.86

 

 

It appears that the order editor is not subtracting the discount from the subtotal.

 

Anthony

Link to comment
Share on other sites

As processed during checkout:

 

It appears that the order editor is not subtracting the discount from the subtotal.

 

Anthony

 

This is the Discount Coupon Codes contribution by kgt?

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

Yes, I just tried it, but problem remains. No file corruption.

I am desesperated, and your patience helping is unvaluable! Many thanks djmonkey1

 

I'm racking my brain and I can't come up with anything that would cause this. Go through the installation instructions with a fine tooth comb, double and triple check that you've done every single step, and re-upload all the new and changed files again.

 

Also, what happens when you try to go to admin/edit_orders.php?oID=2&action=add_product&step=1

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

Yes it is.

 

A

 

In admin/edit_orders.php change

				extract($total_details,EXTR_PREFIX_ALL,"ot");
			 if($ot_class == "ot_shipping")//a good place to add in custom total components

to

				extract($total_details,EXTR_PREFIX_ALL,"ot");
			 if(($ot_class == "ot_shipping") || ($ot_class == "ot_discount_coupon"))//a good place to add in custom total components

 

Then change

  //just adding in shipping tax, don't mind me
	 $ot_shipping_query = tep_db_query("
	 SELECT value 
	 FROM " . TABLE_ORDERS_TOTAL . " 
	 WHERE orders_id = '" . (int)$oID . "'
	 AND class = 'ot_shipping'");

to

  //just adding in shipping tax, don't mind me
	 $ot_shipping_query = tep_db_query("
	 SELECT value 
	 FROM " . TABLE_ORDERS_TOTAL . " 
	 WHERE orders_id = '" . (int)$oID . "'
	 AND (class = 'ot_shipping' OR class = 'ot_discount_coupon')");

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

Order Editor 3.0 FULL Is on Danish Now.

 

I have make 1 changes in admin/edit_orders.php.

Line : 2444

From :

<td class="pageHeading"><?php echo ADDING_TITLE . $_GET['oID']; ?>)</td>

 

To:

<td class="pageHeading"><?php echo ADDING_TITLE . ' ' . $_GET['oID']; ?></td>

 

Is displayed is wrong, but this little changes will displayed it perfect.

 

Thanks for the great work and great contri

Edited by TheExterminator
Link to comment
Share on other sites

I have make this to people there will have Order Editor in at seperat group in Configuration.

You have to run the sql_uninstall.sql first

 

create table order_editor (
 configuration_id int(11) not null auto_increment,
 configuration_title varchar(64) not null ,
 configuration_key varchar(64) not null ,
 configuration_value varchar(255) not null ,
 configuration_description varchar(255) not null ,
 configuration_group_id int(11) default '0' not null ,
 sort_order int(5) ,
 last_modified datetime ,
 date_added datetime default '0000-00-00 00:00:00' not null ,
 use_function varchar(255) ,
 set_function text ,
 PRIMARY KEY (configuration_id)
);

ALTER TABLE orders ADD shipping_tax DECIMAL( 7, 4 ) DEFAULT '0.000' NOT NULL;


INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) values ('100','Order Editor', 'Order Editor', '100', '1'
);

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- Display Payment Method dropdown?', 'ORDER_EDITOR_PAYMENT_DROPDOWN', 'true', 'Based on this selection Order Editor will display the payment method as a dropdown menu (true) or as an input field (false).', '100', '1', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- Display Shipping Method dropdown?', 'ORDER_EDITOR_SHIPPING_DROPDOWN', 'true', 'Based on this selection Order Editor will display the shipping method as a dropdown menu (true) or as an input field (false).', '100', '1', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- use Separate Pricing Per Customer?', 'ORDER_EDITOR_USE_SPPC', 'false', 'This should be set to true only if SPPC is installed.', '100', '1', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- select a tax class for shipping fees', 'ORDER_EDITOR_DEFAULT_TAX_CLASS', '0', 'Order Editor will assess tax on shipping as being a part of this tax class.', '100', '1', now(), now(), 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(');
INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- select your credit card payment method', 'ORDER_EDITOR_CREDIT_CARD', 'Credit Card', 'Order Editor will display the credit card fields when this payment method is selected.', '100', '1', now(), now(), NULL, 'tep_cfg_pull_down_payment_methods(');

Link to comment
Share on other sites

I have make this to people there will have Order Editor in at seperat group in Configuration.

You have to run the sql_uninstall.sql first.

Sorry, it only this sql code you need.

 

ALTER TABLE orders ADD shipping_tax DECIMAL( 7, 4 ) DEFAULT '0.000' NOT NULL;


INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) values ('100','order editor', 'Order Editor', '100', '1'
);

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- Display Payment Method dropdown?', 'ORDER_EDITOR_PAYMENT_DROPDOWN', 'true', 'Based on this selection Order Editor will display the payment method as a dropdown menu (true) or as an input field (false).', '100', '1', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- Display Shipping Method dropdown?', 'ORDER_EDITOR_SHIPPING_DROPDOWN', 'true', 'Based on this selection Order Editor will display the shipping method as a dropdown menu (true) or as an input field (false).', '100', '1', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- use Separate Pricing Per Customer?', 'ORDER_EDITOR_USE_SPPC', 'false', 'This should be set to true only if SPPC is installed.', '100', '1', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- select a tax class for shipping fees', 'ORDER_EDITOR_DEFAULT_TAX_CLASS', '0', 'Order Editor will assess tax on shipping as being a part of this tax class.', '100', '1', now(), now(), 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(');
INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- select your credit card payment method', 'ORDER_EDITOR_CREDIT_CARD', 'Credit Card', 'Order Editor will display the credit card fields when this payment method is selected.', '100', '1', now(), now(), NULL, 'tep_cfg_pull_down_payment_methods(');

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