Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 6 votes

NEW! Complete Order Editing Tool!


3242 replies to this topic

#2941 mom2twins

  • Community Member
  • 27 posts
  • Real Name:Sarah
  • Gender:Female
  • Location:Dallas, TX

Posted 16 October 2009, 03:47

Okay well I came up with a fix for the discount coupon problem.

When I downloaded and installed Order Editor, I also downloaded and installed "Proper QT Pro add-on for Order Editor V2" that was also listed on the Order Editor add on page.

Proper QT Pro add-on for Order Editor is what is causing the coupon codes to not be applied after you edit an order. To fix this, I simply got rid of Proper QT Pro add-on for Order Editor by re-uploading the new files that originally came with Order Editor, thus overwriting the files that were modified with Proper QT Pro add-on for Order Editor.

Without the Proper QT Pro add on, I am not able to have an extremely accurate stock amount, but that is not something that is as important to me as being able to have the coupon codes and the correct order totals when using Order Editor. So, you win some you lose some. Hopefully this will work for others who were having this same problem! :)

#2942 natureguy

  • Community Member
  • 45 posts
  • Real Name:Bruce

Posted 20 October 2009, 20:50

I installed Order Editor 5.0.61 and have a problem with an error.

When I try to edit an order, this error comes up: Fatal error: Call to undefined function tep_round_up() in /home/********/public_html/catalog/includes/modules/shipping/usps.php on line 162. I am using USPS Methods 4.3.1, where line 162: $shipping_ounces = tep_round_up((16 * ($shipping_weight - floor($shipping_weight))), 2);, has something to do with rounding up weight since USPS doesn't allow zero weight. The orders I tried to edit have zero weight and 4.4 ounces of weight with same error.

Any ideas? Someone must have had this issue before. I can't check the funtionality further until I can get past this error. Thanks!

#2943 Stealth1

  • Community Member
  • 334 posts
  • Real Name:Chris

Posted 27 October 2009, 05:00

I just installed this and came up with the error below when I click the edit button in an order.

"Fatal error: Call to undefined method shipping::get_shiptotal() in /store/includes/modules/shipping/indvship.php on line 53"

Any help?

Line 53 in indvship.php reads as $shiptotal = $shipping_modules->get_shiptotal();

Edited by Stealth1, 27 October 2009, 05:11.


#2944 natureguy

  • Community Member
  • 45 posts
  • Real Name:Bruce

Posted 27 October 2009, 16:19

View Postnatureguy, on 20 October 2009, 20:50, said:

I installed Order Editor 5.0.61 and have a problem with an error.

When I try to edit an order, this error comes up: Fatal error: Call to undefined function tep_round_up() in /home/********/public_html/catalog/includes/modules/shipping/usps.php on line 162. I am using USPS Methods 4.3.1, where line 162: $shipping_ounces = tep_round_up((16 * ($shipping_weight - floor($shipping_weight))), 2);, has something to do with rounding up weight since USPS doesn't allow zero weight. The orders I tried to edit have zero weight and 4.4 ounces of weight with same error.

Any ideas? Someone must have had this issue before. I can't check the funtionality further until I can get past this error. Thanks!


#2945 natureguy

  • Community Member
  • 45 posts
  • Real Name:Bruce

Posted 27 October 2009, 16:27

It's been a week and no response :( I had to remove this add-on. Is anyone really getting this add-on to work? I had an unresolvable error as soon as I tried to edit an order, call to an undefined function tep_round_up() on line 162 of the USPS Methods 4.3.1 add on module, usps.php. I haven't had an issue with USPS Methods before. No one has ideas??? Being able to edit orders is rather important and I would sure have liked to have this thing running. Has the tax issues been resolved? I read a lot of issues with people having troubles with adding correct tax.

#2946 natureguy

  • Community Member
  • 45 posts
  • Real Name:Bruce

Posted 29 October 2009, 15:00

View Postnatureguy, on 27 October 2009, 16:27, said:

It's been a week and no response :( I had to remove this add-on. Is anyone really getting this add-on to work? I had an unresolvable error as soon as I tried to edit an order, call to an undefined function tep_round_up() on line 162 of the USPS Methods 4.3.1 add on module, usps.php. I haven't had an issue with USPS Methods before. No one has ideas??? Being able to edit orders is rather important and I would sure have liked to have this thing running. Has the tax issues been resolved? I read a lot of issues with people having troubles with adding correct tax.
Ha ha, I took the long way around the barn and figured this out. It works perfect now. I googled "tep_round_up" and found a solution buried in the forums here. Anyone with USPS Methods V4.3.1 will need to add this to their catalog/admin/includes/funtions/general.php file: (I put it around where USPS Methods are located.)
////
// Round up function for non whole numbers by GREG DEETH
// The value for the precision variable determines how many digits after the decimal and rounds the last digit up to the next value
// Precision = 0 -> xx.xxxx = x+
// Precision = 1 -> xx.xxxx = xx.+
// Precision = 2 -> xx.xxxx = xx.x+
function tep_round_up($number, $precision) {
$number_whole = '';
$num_left_dec = 0;
$num_right_dec = 0;
$num_digits = strlen($number);
$number_out = '';
$i = 0;
while ($i + 1 <= strlen($number))
{
$current_digit = substr($number, $i, ($i + 1) - $num_digits);
if ($current_digit == '.') {
$i = $num_digits + 1;
$num_left_dec = strlen($number_whole);
$num_right_dec = ($num_left_dec + 1) - $num_digits;
} else {
$number_whole = $number_whole . $current_digit;
$i = $i + 1;
}
}
if ($num_digits > 3 && $precision < ($num_digits - $num_left_dec - 1) && $precision >= 0) {
$i = $precision;
$addable = 1;
while ($i > 0) {
$addable = $addable * .1;
$i = $i - 1;
}
$number_out = substr($number, 0, $num_right_dec + $precision) + $addable;
} else {
$number_out = $number;
}
return $number_out;
}

#2947 gbond

  • Community Member
  • 4 posts
  • Real Name:Galen Bond

Posted 31 October 2009, 22:52

Hi... I hae setup the order editing adon and seems to work great... exactly what i needed! I do have one problem... i cant seem to figure out how to take payment! I do not have a live store, only testing so maybe ive not setup something elseware... I think, while creating an order, i should be able to enter the Credit Card and process it...but am missing something!

Thanks in advance for help!

#2948 gbond

  • Community Member
  • 4 posts
  • Real Name:Galen Bond

Posted 01 November 2009, 16:22

View Postgbond, on 31 October 2009, 22:52, said:

Hi... I hae setup the order editing adon and seems to work great... exactly what i needed! I do have one problem... i cant seem to figure out how to take payment! I do not have a live store, only testing so maybe ive not setup something elseware... I think, while creating an order, i should be able to enter the Credit Card and process it...but am missing something!

Thanks in advance for help!

So after much trial and error it turned out to be simple.. i installed another payment method, assigned it as the methon to show the CC fields, then changed the se setting back to Credit Card (Not for production use)....

The only question i have is, once a live payment module is installed, and i enter the credit card numbers, how do i actually process the card? (what button do i need to push sorta thing)

Thanks!

#2949 leveera

  • Community Member
  • 200 posts
  • Real Name:Sergei

Posted 05 November 2009, 12:22

Hello

please advice where to look for correction of calculation
problem is in admin/orders.php only, catalog side is right

it displays for example:
tax 18%
excl tax 23.00EUR
incl tax 27.14EUR
total excl 23.00EUR
total incl 27.14EUR

actual price excl tax is 27,73
actual price incl tax is 28

should be:
tax 18%
excl tax 23.73EUR
incl tax 28.00EUR
total excl 23.73EUR
total incl 28.00EUR

I suggest wrong calculation formulas are
28 - (28 x 0.18) = 23
23 x 1,18 = 27,14

#2950 EcuadorianHands.com

  • Community Member
  • 3 posts
  • Real Name:Fabrizio Vera
  • Location:Manta, Ecuador

Posted 05 November 2009, 17:36

Have you tried to add the same product twice? It won't add the weight of the 2 lines

For example. Product Model 001, lets say it weights 1kilo.

50 x mod 001 = 50kilos
49 x mod 001 = 49
Total = 99 kilos and 99 units

Well, the system will only consider the last line, and it would come up with a:
Total= 49 kilos and 49 units.


Be careful with this. Have anyone fixed this?

Thanks



View Postmom2twins, on 16 October 2009, 03:47, said:

Okay well I came up with a fix for the discount coupon problem.

When I downloaded and installed Order Editor, I also downloaded and installed "Proper QT Pro add-on for Order Editor V2" that was also listed on the Order Editor add on page.

Proper QT Pro add-on for Order Editor is what is causing the coupon codes to not be applied after you edit an order. To fix this, I simply got rid of Proper QT Pro add-on for Order Editor by re-uploading the new files that originally came with Order Editor, thus overwriting the files that were modified with Proper QT Pro add-on for Order Editor.

Without the Proper QT Pro add on, I am not able to have an extremely accurate stock amount, but that is not something that is as important to me as being able to have the coupon codes and the correct order totals when using Order Editor. So, you win some you lose some. Hopefully this will work for others who were having this same problem! :)


#2951 leveera

  • Community Member
  • 200 posts
  • Real Name:Sergei

Posted 06 November 2009, 15:13

Need to correct my post because I inistigated issue and have more details. Hope someone can help with

I found what php script inserts in DB table order_products - final_price field values rounded to .00 (ie 15,25 to 15.00, 23,72 to 23.00)
This is a point where all miscalculations begin
Future investigation led me to includes/classes/shoping_cart.php where

'final_price' => ($products_price + $this->attributes_price($products_id)),

Why this formula rounds "final price"?

Sure "products_price" is correct in DB so where to look next?


View Postleveera, on 05 November 2009, 12:22, said:

Hello
please advice where to look for correction of calculation

....


#2952 fruchtge

  • Community Member
  • 15 posts
  • Real Name:Jens Honda
  • Gender:Male
  • Location:Berlin

Posted 19 November 2009, 08:25

Hello Hello,

I just installed Order Editor order_editor_5_0_7 and qtpro4.6.1 and found a small bug. So everything works fine... I place an order in the shop, fine clothing in vaious colors an sizes. Then I open order editor, deleting products, edit qty., add new products,... the Stock for all colors and sizes is perfectly updated. So here comes the bug: Now I open orders.php and delete the whole order. Now the stock from the new products I added with order editor is not updated.

Anyone had the same ploblem or a solution for that?

life long and knusper! Thank you!
life long and knusper

#2953 surfalot

  • Community Member
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 19 November 2009, 09:53

View Postfruchtge, on 19 November 2009, 08:25, said:

Hello Hello,

I just installed Order Editor order_editor_5_0_7 and qtpro4.6.1 and found a small bug. So everything works fine... I place an order in the shop, fine clothing in vaious colors an sizes. Then I open order editor, deleting products, edit qty., add new products,... the Stock for all colors and sizes is perfectly updated. So here comes the bug: Now I open orders.php and delete the whole order. Now the stock from the new products I added with order editor is not updated.

Anyone had the same ploblem or a solution for that?

life long and knusper! Thank you!

can you confirm that it is ONLY the products added with the Order editor?

If you delete an order that was never edited, it works fine?

#2954 paulchen2005

  • Community Member
  • 146 posts
  • Real Name:Paul

Posted 19 November 2009, 10:36

View Postsurfalot, on 19 November 2009, 09:53, said:

can you confirm that it is ONLY the products added with the Order editor?

If you delete an order that was never edited, it works fine?
i have the problem too....
if i delete orders with qtpro that was never edited it works fine!!!

but not with edited orders and qtpro

best regards
Paul

#2955 surfalot

  • Community Member
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 19 November 2009, 10:49

must be something wrong with Phocea's 20 Jul 2009 contribution.

#2956 paulchen2005

  • Community Member
  • 146 posts
  • Real Name:Paul

Posted 19 November 2009, 11:03

View Postsurfalot, on 19 November 2009, 10:49, said:

must be something wrong with Phocea's 20 Jul 2009 contribution.
yes, i think too... but what is wrong?

#2957 surfalot

  • Community Member
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 19 November 2009, 11:12

View Postpaulchen2005, on 19 November 2009, 11:03, said:

yes, i think too... but what is wrong?

might try to PM Phocea and bring them into the conversation. ;)

#2958 paulchen2005

  • Community Member
  • 146 posts
  • Real Name:Paul

Posted 19 November 2009, 18:19

the error was in this code:
// QT Pro Addon BOF	
					$attrib_q = tep_db_query("select distinct op.products_id, po.products_options_id, pov.products_options_values_id
						                        from products_options po, products_options_values pov, products_options_values_to_products_options po2pov, orders_products_attributes opa, orders_products op
						                        where op.orders_id = '" . $oID . "'
															      and op.orders_products_id = '" . $orders_products_id . "'
															      and products_options_values_name = opa.products_options_values
						                        and pov.products_options_values_id = po2pov.products_options_values_id
						                        and po.products_options_id = po2pov.products_options_id
						                        and products_options_name = opa.products_options");
					while($attrib_set = tep_db_fetch_array($attrib_q)) {
						// corresponding to each option find the attribute ids ( opts and values id )
						$products_stock_attributes[] = $attrib_set['products_options_id'].'-'.$attrib_set['products_options_values_id'];
					}
					sort($products_stock_attributes, SORT_NUMERIC); // Same sort as QT Pro stock
					$products_stock_attributes = implode($products_stock_attributes, ',');
					 // update the stock
					 tep_db_query("update ".TABLE_PRODUCTS_STOCK." set products_stock_quantity = products_stock_quantity + ".$products_details["qty"] . " where products_id= '" . $order_products['products_id'] . "' and products_stock_attributes='".$products_stock_attributes."'");
// QT Pro Addon EOF

because this part:
where products_id= '" . $order_products['products_id'] . "' and products_stock_attributes='".$products_stock_attributes."'");

what must i change to ask about products_stock_id and not products_stock_attributes in where clause????

#2959 paulchen2005

  • Community Member
  • 146 posts
  • Real Name:Paul

Posted 20 November 2009, 07:24

the problem is this part:
and products_stock_attributes='".$products_stock_attributes."'

because products_stock_attributes is 1,2-2,2
but $products_stock_attributes is 1-2
???

what can i do?

#2960 fruchtge

  • Community Member
  • 15 posts
  • Real Name:Jens Honda
  • Gender:Male
  • Location:Berlin

Posted 20 November 2009, 11:07

View Postsurfalot, on 19 November 2009, 09:53, said:

can you confirm that it is ONLY the products added with the Order editor?

If you delete an order that was never edited, it works fine?


Hi all,

thank you much for your commitments, and thats the problem: If edited orders are deleted, stock is not updated.
life long and knusper