Re: EO 4.1 + Reward Points
Quote:
Originally Posted by
remops
... "/admin/FILENAME_ORDER_EDIT.php?page=1&oID=955&action=edit" ...
This usually indicates either Ty Package Tracker or Super Orders was updated AFTER Edit Orders was installed. Another possibility would be the user PHP is running as (on your webserver) does not have permissions to write to "/admin/orders.php".
Please re-run the installer for Edit Orders (this will make the necessary changes to order.php).
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.
Re: EO 4.1 + Reward Points
I get the confirmation
Found previous version installed. Upgrading (or re-installing) Edit Orders (old 4.1.4 => new 4.1.4).
Success Edit Orders installation / upgrade completed!
All looks good untill I click the edit button, then I still get the 404 page.
Thanks again
Re: EO 4.1 + Reward Points
I tried to edit the address field in the customer address, billing address, and shipping address columns. I received a blank page after clicking update and the following log
Code:
PHP Fatal error: Call to undefined function validate_for_category() in
admin/includes/functions/extra_functions/edit_orders_functions.php on line 331
I searched this thread for validate_for_category() but didn't get any results.
Re: EO 4.1 + Reward Points
Quote:
Originally Posted by
remops
... I had all working together. Superoder had been working for a year or so then I updated and then installed Ty tracker and edit order in that order. ...
For some reason I missed this comment...
I'm guessing you overwrote the Super Orders version of "/admin/orders.php" with a copy from Ty Package Tracker. This means portions of the Super Orders plugin are probably broken. I would recommend re-installing / upgrading Super Orders.
Once everything with Ty Package Tracker and Super Orders is installed (and fully working), running the Edit Orders installer again should get you back up and running.
NOTE 1: Reading the README for Edit Orders, it states Ty Package Tracker and Super Orders should be installed PRIOR to Edit Orders... Reading the README for Super Orders, it states Ty Package Tracker should be installed PRIOR to installing Super Orders to avoid potential problems... So the correct order of installation to avoid issues would be Ty Package Tracker, Super Orders, Edit Order.
NOTE 2: As per the Edit Orders README, when using only Ty Package Tracker and Edit Orders (no Super Orders), one needs to manually merge the "/admin/orders.php" file from both (not automated by the installer). If using Super Orders and Ty Package Tracker, follow the installation instructions in Super Orders to install Super Orders before Edit Orders.
NOTE 3: At the minimum, you need to replace "/admin/orders.php" with the copy from Super Orders. However, there may be other files from Super Orders (or Edit Orders) accidentally overwritten when Ty Package Tracker was installed AFTER Super Orders and Edit Orders... If issues persist, I'd recommend starting over and following the installation order listed in NOTE 1 (and of course consulting the README files).
BugFix: EO 4.1 + Coupons with Category / Product Restrictions
Affected Users:
Those running Edit Orders 4.1 and using coupons with category or product restrictions.
Observed Behavior:
When an order contains a "coupon" with a restriction based on category or product the order cannot be edited (and generates a PHP error).
The Fix:
Add the following (in red) to "/admin/includes/functions/extra_functions/edit_orders_functions.php":
Code:
return false; //should never get here
}
}
if(!function_exists('validate_for_category')) {
function validate_for_category($product_id, $coupon_id) {
global $db;
$retVal = 'none';
$productCatPath = zen_get_product_path($product_id);
$catPathArray = array_reverse(explode('_', $productCatPath));
$sql = "SELECT count(*) AS total
FROM " . TABLE_COUPON_RESTRICT . "
WHERE category_id = -1
AND coupon_restrict = 'Y'
AND coupon_id = " . (int)$coupon_id . " LIMIT 1";
$checkQuery = $db->execute($sql);
foreach ($catPathArray as $catPath) {
$sql = "SELECT * FROM " . TABLE_COUPON_RESTRICT . "
WHERE category_id = " . (int)$catPath . "
AND coupon_id = " . (int)$coupon_id;
$result = $db->execute($sql);
if ($result->recordCount() > 0 && $result->fields['coupon_restrict'] == 'N') return true;
if ($result->recordCount() > 0 && $result->fields['coupon_restrict'] == 'Y') return false;
}
if ($checkQuery->fields['total'] > 0) {
return false;
} else {
return 'none';
}
}
}
if(!function_exists('validate_for_product')) {
function validate_for_product($product_id, $coupon_id) {
global $db;
$sql = "SELECT * FROM " . TABLE_COUPON_RESTRICT . "
WHERE product_id = " . (int)$product_id . "
AND coupon_id = " . (int)$coupon_id . " LIMIT 1";
$result = $db->execute($sql);
if ($result->recordCount() > 0) {
if ($result->fields['coupon_restrict'] == 'N') return true;
if ($result->fields['coupon_restrict'] == 'Y') return false;
} else {
return 'none';
}
}
}
// Start Edit Orders configuration functions
function eo_debug_action_level_list($level) {
Reported By:
Thank You to southshorepizza for finding this one!
Re: EO 4.1 + Reward Points
Quote:
Originally Posted by
lhungil
For some reason I missed this comment...
I'm guessing you overwrote the Super Orders version of "/admin/orders.php" with a copy from Ty Package Tracker. This means portions of the Super Orders plugin are probably broken. I would recommend re-installing / upgrading Super Orders.
Once everything with Ty Package Tracker and Super Orders is installed (and fully working), running the Edit Orders installer again should get you back up and running.
NOTE 1: Reading the README for Edit Orders, it states Ty Package Tracker and Super Orders should be installed PRIOR to Edit Orders... Reading the README for Super Orders, it states Ty Package Tracker should be installed PRIOR to installing Super Orders to avoid potential problems... So the correct order of installation to avoid issues would be Ty Package Tracker, Super Orders, Edit Order.
NOTE 2: As per the Edit Orders README, when using only Ty Package Tracker and Edit Orders (no Super Orders), one needs to manually merge the "/admin/orders.php" file from both (not automated by the installer). If using Super Orders and Ty Package Tracker, follow the installation instructions in Super Orders to install Super Orders before Edit Orders.
NOTE 3: At the minimum, you need to replace "/admin/orders.php" with the copy from Super Orders. However, there may be other files from Super Orders (or Edit Orders) accidentally overwritten when Ty Package Tracker was installed AFTER Super Orders and Edit Orders... If issues persist, I'd recommend starting over and following the installation order listed in NOTE 1 (and of course consulting the README files).
Installed the files and all is good! :laugh:
Thanks
Re: EO 4.1 + Reward Points
Quote:
Originally Posted by
remops
Installed the files and all is good! :laugh:
Glad you were able to get everything sorted.
Re: EO 4.1 + Reward Points
Thank you for fixing that bug!!
Re: EO 4.1 + Reward Points
Unable to remove a quantity discount when editing an order. I have this http://www.zen-cart.com/downloads.php?do=file&id=135 module installed. When you edit an order the quantity discount down in the total doesn't have a text box for the amount. It does have a text box for the title "quantity discount". But without the text box I can't adjust the amount. The discount also doesn't change if you remove any products. But that would be okay if I could adjust the amount of the discount or remove it. Thanks for your help.
Re: EO 4.1 + Reward Points
If I give something to a customer for free I cannot zero out the tax on an order.