Re: Edit Orders v4.0 Support Thread
I am desperately trying to get this plugin to work but after upgrading super orders (and verifying it worked) then re - installeing edit orders as per the instructions in the readme file I still get a 404 error when clicking the Edit button. the button is trying to take me to:
http://gslcuts.com/Store/zoo/FILENAM...05&action=edit
so I dont beleive the installation files are doing this bit:-NOTE: As per the readme, Edit Orders will automatically update the relevant files including "/admin/orders.php" when the installer is run. Among other things it replaces FILENAME_ORDER_EDIT with FILENAME_EDIT_ORDERS.
Any help would be greatly appreciated as its driving me nuts
I do NOT have Ty Package Tracker installed
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
angdrumm
I am desperately trying to get this plugin to work but after upgrading super orders (and verifying it worked) then re - installeing edit orders as per the instructions in the readme file I still get a 404 error when clicking the Edit button. the button is trying to take me to:
http://gslcuts.com/Store/zoo/FILENAM...05&action=edit
so I dont beleive the installation files are doing this bit:-NOTE: As per the readme, Edit Orders will automatically update the relevant files including "/admin/orders.php" when the installer is run. Among other things it replaces FILENAME_ORDER_EDIT with FILENAME_EDIT_ORDERS.
Any help would be greatly appreciated as its driving me nuts
I do NOT have Ty Package Tracker installed
Please identify which version of Edit Orders is being attempted to be installed, as well as the other information of the posting tips...
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
mc12345678
Please identify which version of Edit Orders is being attempted to be installed, as well as the other information of the posting tips...
Please ignore my previous post, I am really not sure what happened but I have got it working. I havent a clue what I did however :( Thanks for answering anyway
Re: Edit Orders v4.0 Support Thread
Suddenly when I edit an order and click "Update" it is redirected to the site's home page, no changes were done to the site
Re: Edit Orders v4.0 Support Thread
ok, i have searched a bit in this thread for this bug, and i did not see it. if i missed it, and i am duplicating a post, i apologize in advance. i suppose in the grand scheme of things, this bug is minor, but, a bug is still a bug.
if an admin enters a coupon code for an order, the coupon code does not get populated in the orders table. and without the field, the couponpopupWindow will NOT properly display on the customers side (or the admin side). the easiest fix i have found without changing much of the logic, starts at line 465. below is the original section of code along with my proposed fix to it.
PHP Code:
case 'ot_coupon':
// Default to using the title from the module
$coupon = rtrim($order_total['title'], ': ');
$order_total['title'] = $GLOBALS[$order_total['code']]->title;
// Look for correctly formated title
preg_match('/([^:]+):([^:]+)/', $coupon, $matches);
if(count($matches) > 2) {
$order_total['title'] = trim($matches[1]);
$coupon = $matches[2];
}
$cc_id = $db->Execute(
'SELECT coupon_id FROM `' . TABLE_COUPONS . '` ' .
'WHERE coupon_code=\'' . trim($coupon) . '\''
);
unset($matches, $coupon);
if(!$cc_id->EOF) $_SESSION['cc_id'] = $cc_id->fields['coupon_id'];
else {
$messageStack->add_session(WARNING_ORDER_COUPON_BAD, 'warning');
$order_total['title'] = '';
$order_total['value'] = 0;
}
unset($cc_id);
// proposed fix:
case 'ot_coupon':
// Default to using the title from the module
$coupon = rtrim($order_total['title'], ': ');
$order_total['title'] = $GLOBALS[$order_total['code']]->title;
// Look for correctly formated title
preg_match('/([^:]+):([^:]+)/', $coupon, $matches);
if(count($matches) > 2) {
$order_total['title'] = trim($matches[1]);
$coupon = $matches[2];
}
$cc_id = $db->Execute(
'SELECT coupon_id, coupon_code FROM `' . TABLE_COUPONS . '` ' .
'WHERE coupon_code=\'' . trim($coupon) . '\''
);
unset($matches, $coupon);
if(!$cc_id->EOF) {
$_SESSION['cc_id'] = $cc_id->fields['coupon_id'];
$sql_data_array['coupon_code'] = $cc_id->fields['coupon_code'];
zen_db_perform(TABLE_ORDERS, $sql_data_array, 'update', 'orders_id = \'' . (int)$oID . '\'');
unset($sql_data_array);
$order_updated = true;
} else {
$messageStack->add_session(WARNING_ORDER_COUPON_BAD, 'warning');
$order_total['title'] = '';
$order_total['value'] = 0;
}
unset($cc_id);
Re: Edit Orders v4.0 Support Thread
Hello,
I've got a custom module for combined attributes pricing. As I'm not the one who wrote it (I don't have the skills) I've reviewed its files and quite understood how it works .
The module maintains a table where it keeps rules (if attrib-A price=A then attrib-B price =x)
A class handles all the price changing in session values (I think), but most important everything is done by monitoring four events :
NOTIFIER_CART_CALCULATE_ATTRIBUTE
NOTIFIER_CART_ATTRIBUT_SELECT
NOTIFY_HEADER_SHOPPING_CART_OPTION_PRICE
NOTIFIY_ORDER_CART_FINISHED.
On any of these events the class is triggered and changes the attributes prices.
But now I'm planning to use Edit Orders, and as this behavior is only monitoring the client side, prices are not changed in Edit Orders.
Do you think adding "$this->notify" lines to the Edit Orders would be enough to trigger the class and change prices ?
If so, can an Edit Order expert suggest me where to place these line in the edit_orders.php file ?
Thanks for your help.
Hubert
Re: Edit Orders v4.0 Support Thread
I am not an EO export, but it's a very popular plugins among my clients.
The current (4.1.4) version of EO includes a mock shopping-cart class, where the cart-related notifiers might be added; you'll need to review the functions where those top two notifiers are issued in the store-front class and then mimic that behavior in the mock-cart class.
The admin-console version of the order-class only supports order-instantiate, not create-order-from-cart (where the last notifier is issued store-front), so you'll need to review how that notifier is used by the plugin so that you can mimic that behavior within the admin-console handling.
Finally, you'll need to create an admin-console auto_loader to make sure that your attribute-calculator is loaded during the admin-level processing so that it's available to handle those notifications.
Re: Edit Orders v4.0 Support Thread
Thanks lat9, but let me rephrase to be sure I understood what you're saying.
1-ZC naturally issues events that can be interrupted and triggers a new add-on behavior.
Quote:
Originally Posted by
lat9
I am not an EO export, but it's a very popular plugins among my clients.
The current (4.1.4) version of EO includes a mock shopping-cart class, where the cart-related notifiers might be added; you'll need to review the functions where those top two notifiers are issued in the store-front class and then mimic that behavior in the mock-cart class.
2-EO has its own cart management class, so I have to add notifier calls to this class so that these new events calls my behavior.
Quote:
Originally Posted by
lat9
The admin-console version of the order-class only supports order-instantiate, not create-order-from-cart (where the last notifier is issued store-front), so you'll need to review how that notifier is used by the plugin so that you can mimic that behavior within the admin-console handling.
3-ZC Admin side, and so EO does not makes regular orders but only loads existing orders, modifies (thanks EO), and replace the order in the tables.
Quote:
Originally Posted by
lat9
Finally, you'll need to create an admin-console auto_loader to make sure that your attribute-calculator is loaded during the admin-level processing so that it's available to handle those notifications.
That is the easy part :-)
Reading you I just realized that these four events :
NOTIFIER_CART_CALCULATE_ATTRIBUTE
NOTIFIER_CART_ATTRIBUT_SELECT
NOTIFY_HEADER_SHOPPING_CART_OPTION_PRICE
NOTIFIY_ORDER_CART_FINISHED
are not in https://www.zen-cart.com/wiki/index....et_in_Zen_Cart.
Or are they and the website list is only (as stated) "Notifier points for Zen Cart 1.3.7".
In other words has the developer created its own events or are these regular ZC 1.5 events. I didn't saw that these could be custom events.
Re: Edit Orders v4.0 Support Thread
The notifiers that your custom-module uses are, I think, built-in to the Zen Cart store-front processing. You can see where they are used by entering each one into your admin's Tools->Developers Tool Kit. That wiki article hasn't been updated in a dogs-age.
Re: Edit Orders v4.0 Support Thread
Just for reference,
NOTIFIER_CART_CALCULATE_ATTRIBUTE
NOTIFIER_CART_ATTRIBUT_SELECT
NOTIFY_HEADER_SHOPPING_CART_OPTION_PRICE
are not in the 1.5.4, only
NOTIFIY_ORDER_CART_FINISHED is in /includes/classes/order.php.