Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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.
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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..
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:
Code:
Subtotal: $152.00
GC (40%): -$60.80
Tax (6%): $5.47
Total: $96.67
What shows up after editing the order is:
Code:
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.
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.
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:
Code:
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;
}
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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.
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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.
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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 :)
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?
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