Re: Edit Orders v4.0 Support Thread
Great info, lhungil. I will look into the "In Store Purchase" button!
As you say, the different areas of Canada do, indeed, have different tax rates, based on province. Luckily for us, we only charge GST (Country wide) and not PST (Provincial) so the set up we have will work, though, it may be smart to be prepared for possible changes. You never know!
Re: Edit Orders v4.0 Support Thread
Hi All,
Sorry to bug, yet again, but I am now getting the dreaded 'white screen' when attempting to update an order via edit_orders.php
log message: PHP Fatal error: Call to undefined function validate_for_category() in /home/content/11/6854611/html/shop/admin/includes/functions/extra_functions/edit_orders_functions.php on line 331
line 331
Quote:
$allow_for_category = validate_for_category($product_id, $coupon_id);
Any help would be greatly appreciated!
Re: Edit Orders v4.0 Support Thread
Update:
I believe it was an edit I made to the edit_orders.php file (Cosmetic). I uploaded a fresh copy and it is working. Thx.
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
gigi3
Update:
I believe it was an edit I made to the edit_orders.php file (Cosmetic). I uploaded a fresh copy and it is working. Thx.
Thank You for letting us know. out of curiosity, what is the cosmetic change you desired?
Re: Edit Orders v4.0 Support Thread
I added another 'edit' button directly to the left of the 'add product' button, and added another 'details' button directly below the order total, renaming the .gif 'submit'. The idea is to simplify the screen for cashiers. Edit Orders automatically stores the order which we felt may be confusing for the cashiers with nothing to click to 'complete' the order....
I also commented out the payment method section, as we use only one payment method and currently don't use that portion, again, the goal being to simplify the page for the cashiers.
A fresh edit_orders.php version seems to work, and, after adding the 'edit' and the renamed 'details' button without commenting out the payment method WAS working for a while...then, all of a sudden, after attempting to add a coupon, I get the white screen again.
It seems to happen when a coupon is added. I have recently set up coupons with restricted categories. I'm wondering if that is part of the problem as the error message references categories?
Any thoughts?
Re: Edit Orders v4.0 Support Thread
So, I just uploaded another fresh copy of edit_orders.php and it is giving me the 'white screen' when I attempt to add a coupon. It seems it is not the changes I have made.
I am receiving the same error message in the logs:
Quote:
[14-Oct-2015 08:45:50] PHP Fatal error: Call to undefined function validate_for_category() in /html/shop/admin/includes/functions/extra_functions/edit_orders_functions.php on line 331
Any help would be greatly appreciated!
Re: Edit Orders v4.0 Support Thread
Added:
I am also noticing that after I get the initial white screen from adding a coupon, I get the white screen for ANY 'edit' I make on the page, save for adding a new product....
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
gigi3
So, I just uploaded another fresh copy of edit_orders.php and it is giving me the 'white screen' when I attempt to add a coupon. It seems it is not the changes I have made.
I am receiving the same error message in the logs:
Any help would be greatly appreciated!
My copy of /YOUR_ADMIN/includes/functions/extra_functions/edit_orders_functions.php has the following code block added, just above the function declaration for eo_debug_action_level_list:
Code:
//-bof-20140423-lat9-forum bugfix
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';
}
}
}
//-eof-20140423-lat9
Re: Edit Orders v4.0 Support Thread
I apologize for my late response...I caught a nasty bug and was in bed for the last few days...ugh.
That update seems to work like a charm. Thank you, so much!
Re: Edit Orders v4.0 Support Thread
Hi All,
I have been searching the forum for info, but haven't come across it yet and thought I'd ask here.
As we are using Zen Cart for In Store orders, I am wondering if there is any addon for when a client pays by cash where you can input the cash amount and it will calculate change?
I am posting this here in the Edit Order thread as it seems logical that most people using Zen Cart for In Store purchases will be using Edit Orders + New Order.
If anyone has any thoughts I'd love to hear them. Thanks!
Thanks.