Zen Cart Logo
Forums / Addon Admin Tools / Edit Orders v4.0 Support Thread

Edit Orders v4.0 Support Thread

Views: 345,912

Results 241 to 260 of 1,927
13 Aug 2013, 22:20
#241
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Edit Orders v4.0 Support Thread

DivaVocals:

You continue to haphazardly ask questions about Super Orders, Edit Orders and Ty Package Tracker in all three support threads as if these modules are interchangeable.. they are not..

That said, are you referring the the Ty Package Tracker fields in Edit Orders edit_orders.php?? If so then this is probably the right place to ask the question.. If this is the orders.php file where you are having the issue, then you need to ask your question in the correct support thread..

thanks for the clarification. Based on your clarification, This problem occurred in the "edit order page" where you input the Tracking numbers, as well as in the customer<orders page. ( I have all 3 mods, EO, SO, And ty Pakage Installed) The TyPackage page is no longer there as in zc1.3.9h. It is now one and the same as the "orders Page" and The "Edit Orders Page" since the tracking input boxes appear in both of these pages.

So I assume this is the correct place to ask the question.

For some reason, the problem was fixed after I tried many times over and over again to input the UPS tracking number in the box until one time that I clicked the "comment" box without putting any comments in it, then add the tracking numbers follow by clicking update button.
I was surprised that it worked. So I tested it again and it now seems to be fine and working as before.

Don't know why it behave like this.

14 Aug 2013, 00:17
#242
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Edit Orders v4.0 Support Thread

twi:

thanks for the clarification. Based on your clarification, This problem occurred in the "edit order page" where you input the Tracking numbers, as well as in the customer<orders page. ( I have all 3 mods, EO, SO, And ty Pakage Installed) The TyPackage page is no longer there as in zc1.3.9h. It is now one and the same as the "orders Page" and The "Edit Orders Page" since the tracking input boxes appear in both of these pages.

So I assume this is the correct place to ask the question.

For some reason, the problem was fixed after I tried many times over and over again to input the UPS tracking number in the box until one time that I clicked the "comment" box without putting any comments in it, then add the tracking numbers follow by clicking update button.
I was surprised that it worked. So I tested it again and it now seems to be fine and working as before.

Don't know why it behave like this.

Ty Package Tracker issues on the edit_orders.php page is an Edit Orders question.. issues on the orders.php page is a question for the Ty Package Tracker thread.. Having all three modules doesn't matter.. The fact that they are designed to work together without much fuss does not mean that these mods and their support threads are interchangeable..

14 Aug 2013, 17:09
#243
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Client has a customer who ordered 1 item (with a single drop-down attribute) for $140.00. Customer has a 40% Gift certificate which is applied at the original order (-$56.00). After the gift certificate, the 6% tax (+$5.04) is applied for an order total of $89.04.

So far, so good. Customer calls and requests that the order include 2 of an additional item (no attributes) @ $6.00 per item. Now the order should look like:

Subtotal:      $152.00
GC (40%):    -$60.80
Tax (6%):        $5.47
Total:             $96.67

What shows up after editing the order is:

Subtotal:     $152.00
GC (40%):   -$56.00  (the original 40% value)
Tax (6%):       $9.12  (on the full subtotal)
Total:          $161.12  (Subtotal + Tax, no discount)

I'll take a peek in the code (4.1.3), but was hoping to have other eyes take a look, too!
Sorry about the formatting, I don't know what's up.

14 Aug 2013, 17:58
#244
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

The issue in the previous post was a coupon, not a gift-voucher ... sorry for my confusion.

My initial take (looking at the ot_coupon processing) is that the $_SESSION['cc_id'] (containing the coupon_id value) needs to be set if the order includes an ot_coupon order_total value.

14 Aug 2013, 18:23
#245
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

OK, here's what corrected the issue for me. I made these changes to the eo_get_order_by_order_id function of /YOUR_ADMIN/includes/functions/extra_functions/edit_orders_functions.php:

function eo_get_order_by_id($oID) {
	global $db, $order;

	// Retrieve the order
	$order = new order($oID);

	// Add some required customer information for tax calculation
	// The next method has been modified to add required info to the
	// session and global variables.
	zen_get_tax_locations();

	// Cleanup tax_groups in the order (broken code in order.php)
	// Shipping module will automatically add tax if needed.
	$order->info['tax_groups'] = array();
	foreach($order->products as $product) {
		eo_get_product_taxes($product);
	}

	// Correctly add the running subtotal (broken code in order.php)
	if(!array_key_exists('subtotal', $order->info)) {
		$query = $db->Execute(
			'SELECT value FROM `' . TABLE_ORDERS_TOTAL . '` ' .
			'WHERE `orders_id` = \'' . (int)$oID . '\' ' .
			'AND `class` = \'ot_subtotal\''
		);
		if(!$query->EOF) {
			$order->info['subtotal'] = $query->fields['value'];
		}
	}

	// Convert country portion of addresses to same format used in catalog side
	$country = null;
	if(array_key_exists('country', $order->customer)) {
		$country = eo_get_country($order->customer['country']);
		if($country !== null) {
			$order->customer['country'] = $country;
			$order->customer['zone_id'] = zen_get_zone_id($order->customer['country']['id'], $order->customer['state']);
		}
	}
	if(array_key_exists('country', $order->delivery)) {
		$country = eo_get_country($order->delivery['country']);
		if($country !== null) {
			$order->delivery['country'] = $country;
			$order->delivery['zone_id'] = zen_get_zone_id($order->delivery['country']['id'], $order->delivery['state']);
		}
	}
	if(array_key_exists('country', $order->billing)) {
		$country = eo_get_country($order->billing['country']);
		if($country !== null) {
			$order->billing['country'] = $country;
			$order->billing['zone_id'] = zen_get_zone_id($order->billing['country']['id'], $order->billing['state']);
		}
	}
	unset($country);

	// Handle shipping costs (module will automatically handle tax)
	if(!array_key_exists('shipping_cost', $order->info)) {
		$query = $db->Execute(
			'SELECT value FROM `' . TABLE_ORDERS_TOTAL . '` ' .
			'WHERE `orders_id` = \'' . (int)$oID . '\' ' .
			'AND `class` = \'ot_shipping\''
		);
		if(!$query->EOF) {
			$order->info['shipping_cost'] = $query->fields['value'];

			$_SESSION['shipping'] = array(
				'title' => $order->info['shipping_method'],
				'id' => $order->info['shipping_module_code'] . '_',
				'cost' => $order->info['shipping_cost']
			);

			if(!isset($_SESSION['cart'])) {
				require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'shopping_cart.php');
				$_SESSION['cart'] = new shoppingCart();
			}

			// Load the shipping class into the globals
			require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'shipping.php');
			$shipping_modules = new shipping($_SESSION['shipping']);
		}
	}
//-bof-20130814-lat9  
  // Special handling for coupons:  Need to set the coupon_id associated with the coupon into
  // the session for the coupon amount to be automatically recalculated.
  unset($_SESSION['cc_id']);
  if (isset($order->info['coupon_code']) && zen_not_null($order->info['coupon_code'])) {
    $coupon_info = $db->Execute('SELECT c.coupon_id FROM ' . TABLE_COUPONS . ' c, ' . TABLE_COUPON_REDEEM_TRACK . " crt
                                  WHERE c.coupon_id = crt.coupon_id
                                    AND c.coupon_code = '" . $order->info['coupon_code'] . "'
                                    AND crt.order_id = " . (int)$oID);
    if (!$coupon_info->EOF) {
      $_SESSION['cc_id'] = $coupon_info->fields['coupon_id'];
    }
  }
//-eof-20130814-lat9

	return $order;
}
14 Aug 2013, 19:13
#246
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

lat9:

OK, here's what corrected the issue for me. I made these changes to the eo_get_order_by_order_id function of /YOUR_ADMIN/includes/functions/extra_functions/edit_orders_functions.php:
Please do not apply the above code changes. Coupon processing (and adding cc_id to the session) currently takes place when the update button is pressed.

The "add product" button does not currently process all order total lines (ot_coupon is one of these). As a temporary workaround, after adding a product one should click the "update" button to update the order totals.

14 Aug 2013, 19:42
#247
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

lhungil:

Please do not apply the above code changes. Coupon processing (and adding cc_id to the session) currently takes place when the update button is pressed.

The "add product" button does not currently process all order total lines (ot_coupon is one of these). As a temporary workaround, after adding a product one should click the "update" button to update the order totals.
Will do. I did the "trick" of clicking the "Update" button after the "add product" and the order recalculated properly.

14 Aug 2013, 20:01
#248
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

lat9:

Will do. I did the "trick" of clicking the "Update" button after the "add product" and the order recalculated properly.
Thank You for letting us know. Looks like some serious refactoring will be in order to fix the "add product" process :)

24 Aug 2013, 15:48
#249
southshorepizza avatar

southshorepizza

Zen Follower

Join Date:
Sep 2012
Posts:
253
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

I am using zencart 1.5.1 with the latest spanish pack install. Well I downloaded less than a month ago. Anyways. I am also using edit orders plug in most current version. When I try to edit an order the attributes are in spanish. How do I fix this?

26 Aug 2013, 00:09
#250
petro avatar

petro

New Zenner

Join Date:
Aug 2013
Location:
Houston, Texas
Posts:
35
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Hey guys Im having some issues with my 1.5.1 and this mod. when I modify an order with a different quantity or even add a new item the subtotals and over all totals go berzerk! I can post screen shots of my issues if needed

26 Aug 2013, 00:17
#251
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Edit Orders v4.0 Support Thread

petro:

Hey guys Im having some issues with my 1.5.1 and this mod. when I modify an order with a different quantity or even add a new item the subtotals and over all totals go berzerk! I can post screen shots of my issues if needed

You can start by explaining what you mean by "the subtotals and over all totals go berzerk!"

What do the totals read, what do you expect them to be..

without some explanation screenshots by themselves will not be very helpful..

26 Aug 2013, 01:55
#252
petro avatar

petro

New Zenner

Join Date:
Aug 2013
Location:
Houston, Texas
Posts:
35
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Diva, you are absolutely right. I was pretty vague in my description. I will compile a few screenshots with in details as to whats happening. Diva, I really appreciate you taking your time to help mere mortals such as myself. Thanks :smile:

26 Aug 2013, 15:17
#253
petro avatar

petro

New Zenner

Join Date:
Aug 2013
Location:
Houston, Texas
Posts:
35
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Diva I will attempt to go over the problem I am having. I hope i can get this figured out because this Edit Order mod would be so handy for me with it working how it probably does with everyone who is not a scripting or webmaster newb :-) like myself.

ok the first pics show an invoice with 1 item sold. I can freely modify the quantity or price of that one original item just fine. I do not notice any problems going this route.

Clicking "Edit" button

Changed quantity to "12" and everything is OK :-)

I then add a "New Product" and it appears ok immediately after adding the product

I then hit "update" while changing nothing and then the sub totals and totals go awry.
If I were to hit update again, a new amount would appear regardless if I changed any quantities or costs.

I attempted to change the original item from a quantity of "10" to a quantity of "8" and got a negative number for my order total.

26 Aug 2013, 17:16
#254
petro avatar

petro

New Zenner

Join Date:
Aug 2013
Location:
Houston, Texas
Posts:
35
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Also my products are priced with discounts based on the quantity they order. im running 1.5.1 ZC and the latest version of this plugin as of 2 weeks ago when i downloaded it from here.

27 Aug 2013, 04:37
#255
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

petro:

Also my products are priced with discounts based on the quantity they order. im running 1.5.1 ZC and the latest version of this plugin as of 2 weeks ago when i downloaded it from here.
Cannot duplicate this in a stock Zen Cart 1.5.1 install w/ Edit Orders 4.1.2. Can you answer a few questions to help us understand what may be different in your Zen Cart installation and provide some more information so we can better attempt to help?

  1. What version of Edit Orders do you have installed ("admin" -> "configuration" -> "Edit Orders")?
  2. Did you upgrade Edit Orders from a previous version of Edit Orders?
  3. What order total modules do you have installed and enabled ("admin" -> "modules" -> "order totals"?
  4. Have you tried removing and re-installing Edit Orders (instructions in the readme)?
  5. What (if anything) is in the Zen Cart debug logs and server error logs?
27 Aug 2013, 14:13
#256
petro avatar

petro

New Zenner

Join Date:
Aug 2013
Location:
Houston, Texas
Posts:
35
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Lol I think I may have found the problem :dontgetit

1:) 4.1.1
2:) clean install
3:) Total, and Sub-Total
4:) I have not tried removing and reinstalling.
5:) How do I check zen cart logs?

PS thanks again for the help! If you give me the go-ahead Ill remove this 4.1.1 and install 4.1.2 :-)

27 Aug 2013, 14:50
#257
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Edit Orders v4.0 Support Thread

petro:

Lol I think I may have found the problem :dontgetit

1:) 4.1.1
2:) clean install
3:) Total, and Sub-Total
4:) I have not tried removing and reinstalling.
5:) How do I check zen cart logs?

PS thanks again for the help! If you give me the go-ahead Ill remove this 4.1.1 and install 4.1.2 :-)

You need the OKAY to install the latest version?? Ummm.. why would you need a green light for this??? You should just install the latest version to see if it fixes your issue..

27 Aug 2013, 15:15
#258
petro avatar

petro

New Zenner

Join Date:
Aug 2013
Location:
Houston, Texas
Posts:
35
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Thanks Diva, Ill try it out :smile:

27 Aug 2013, 15:38
#259
petro avatar

petro

New Zenner

Join Date:
Aug 2013
Location:
Houston, Texas
Posts:
35
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Easy fix thanks guys! Im pretty new to this stuff, sorry I wasted everyones time lol. Its working flawlessly now!

27 Aug 2013, 23:52
#260
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

petro:

...
5:) How do I check zen cart logs?
...
I have links in my "signature" for both the Zen Cart logs and server error logs. Useful items to take a look at if something goes wrong in Zen Cart (or a Zen Cart modification) ;)

petro:

Easy fix thanks guys! ... Its working flawlessly now!
Thank You for reporting updating to the latest fixed the issue(s) you were encountering.

For Edit Orders 4.1.2 - There is a minor code change you may wish to make if you add comments to the order w/o changing the order status. In order to add the comments w/o a status change make the alteration Lat9 posted earlier in this thread.