The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
Please disregard the above post (timeout while editing - lost connection).
The "Onetime Discount" module was intended to be used when a store owner needs to offset the entire cost of an order due to a problem caused by humans at the store. For example failing to meet the expected shipping date. As such it does not alter the product pricing or taxes. It simply provides a simple way of handling issues caused by human error (the alternative workflow is creating "store credit" and applying it against the order).
The order total module ot_tax applies taxes based on product price, so you are correct. The tax will always reflect the tax rate against the product price listed in the order.
What is the situation requiring the order be discounted? Does the situation occur often? Can the store owner just move the sort_order to be after tax and add the amount of the tax to the actual discount they manually add?
Hopefully the above will work for the store's situation (I am curious about the situation, so examples are welcome). I'd also be receptive to contributed code adding "tax recalculation" to ot_onetime_discount (preferable checking if ot_tax is enabled, what the sort_orders of the two modules are, and if any other modules have already altered the pricing / tax).
Last edited by lhungil; 18 Dec 2014 at 07:46 PM.
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
The site is using the 1-time discount as a "quick and dirty" coupon. Both ot_onetime_discount (sort order 260) and ot_tax (sort order 300) are enabled. The site uses this feature often enough that they don't want to have to manually calculate the tax to be subtracted as well.
Oh my, that tax calculation does get complicated in the general case!An order could contain a mixture of products with different tax rates (perhaps some taxed, some not) so simply recalculating the tax on the total doesn't work. Then there's the added complication of multiple tax rates being applied.
For my client, it's much simpler. A cart can include only one product and the (single) tax rate applied to that product is applied to the order's sub-total.
Indeed it does :) Especially with the recent / upcoming changes and differing rules in different geographical regions.
I suppose in your client's case, a quick and dirty line to subtract the tax difference from the session variable holding the tax amount would work... Rather then trying to handle things generically and cover all possibilities...
Are the "coupons" applied to all customers? Select customers? Based upon a formula? Would one of "That Software Guys" discount modules work (these can do product level discounts and tax adjustments)?
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
Present:
Live shop running on ZC 1.5.1
Quantity Discounts 1.12
Edit Orders 4.0.4
Goal:
Live shop running on ZC 1.5.3
Quantity Discounts 1.12
Edit Orders 4.1.4
Which is the best way to upgrade?
- Upgrade to ZC 1.5.3 with edited files and then upgrade to Edit Orders 4.1.4
- Upgrade to Edit Orders 4.1.4 and then upgrade to ZC 1.5.3 with edited files
Edit Orders 4.1.4 is compatible with both Zen Cart 1.5.1 and 1.5.3. Edit Orders 4.0.x is not compatible with Zen Cart 1.5.3. So, either the Edit Orders upgrade should be done first (may need to run the plugin installer after the Zen Cart upgrade) or the old version of Edit Orders removed before upgrading to Zen Cart 1.5.3.
I would recommend reading the following article (and supporting articles): How do I rebuild my site on the new version? Especially when upgrading to Zen Cart 1.5.3 from an older versions: starting with clean (no old files or modifications present) Zen Cart files* , upgrading the database, and rebuilding is less prone to errors (and faster for me).
*NOTE: When upgrading to Zen Cart 1.5.3, I would recommend applying the relevant fixes from the official Zen Cart 1.5.3 known bugs (and fixes) thread before running zc_install.
Last edited by lhungil; 22 Dec 2014 at 10:05 PM.
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
The download appears to be corrupt. When trying to unzip all I get an error while extracting. I then tried to unzip each folder one at a time. This works untill I reach the readme folder. The folders will unzip but the index.html will not extract. Does anyone have any ideas hoe I can work around this issue?
Bookmarks