@lhungil and others- there's a small interoperability with Edit Orders and my discounting mods (Better Together, Quantity Discounts, etc.)
You'll get a white screen and an error log that looks like this:
[01-Jun-2013 06:53:00 UTC] PHP Fatal error: Call to undefined function zen_get_tax_rate_from_desc() in /var/www/html/demo_151/includes/modules/order_total/ot_giftwrap_checkout.php on line 184
The issue is that on the admin side, the function zen_get_tax_rate_from_desc() is not included. So a simple fix would be to pull this function (from includes/functions/functions_taxes) and put it into admin/includes/functions/extra_functions/edit_orders_functions.php.
The code you need is
Code:
// Get tax rate from tax description
function zen_get_tax_rate_from_desc($tax_desc) {
global $db;
$tax_rate = 0.00;
$tax_descriptions = explode(' + ', $tax_desc);
foreach ($tax_descriptions as $tax_description) {
$tax_query = "SELECT tax_rate
FROM " . TABLE_TAX_RATES . "
WHERE tax_description = :taxDescLookup";
$tax_query = $db->bindVars($tax_query, ':taxDescLookup', $tax_description, 'string');
$tax = $db->Execute($tax_query);
$tax_rate += $tax->fields['tax_rate'];
}
return $tax_rate;
}
Bookmarks