Open webchills opened 4 years ago
@webchills, I'll need to review your proposal and think on it a bit to understand the implications.
One thing, for instance, is that the order (on storefront order placement) will include the language constant based on the language that's in use for the checkout. Unfortunately, that language indication isn't (currently) stored in the order itself — I was thinking that an order in a multi-lingual store should be updated and use the language that was in effect when the order was placed.
Noting that a language_code
field was added to the orders
table for zc157.
Currently (and since the beginning) Zen Cart is showing the included or added tax rate everywhere in a spartanic way, showing just the tax rate in the order total (e.g. 10%). No hint that this percentage means the included or added tax. Of course you can change the tax rate description in admin to e.g. included tax 10% But this field is lacking multilanguage support since the beginning, so all invoices in a multilanguage store will then show included tax 10% which is not cool for non English orders. There is a simple way to achieve a comprehensive multilanguage tax description by changing in includes/modules/order_total/ot_tax.php around line 49 from
$this->output[] = array('title' => ((is_numeric($key) && $key == 0) ? TEXT_UNKNOWN_TAX_RATE : $key) . ':',
to$this->output[] = array('title' => $this->description .' '.((is_numeric($key) && $key == 0) ? TEXT_UNKNOWN_TAX_RATE : $key) . ':',
and around line 57 from$taxDescription .= ((is_numeric($key) && $key == 0) ? TEXT_UNKNOWN_TAX_RATE : $key) . ' + ';
to$taxDescription .= $this->description .' '.((is_numeric($key) && $key == 0) ? TEXT_UNKNOWN_TAX_RATE : $key) . ' + ';
Then you define in includes/languages/english/modules/order_total/ot_tax.php
define('MODULE_ORDER_TOTAL_TAX_DESCRIPTION', 'Included Tax');
and accordingly in your other languages and have a comprehensive multilanguage tax descriptionWhen using Edit Orders this approach comes to an end as Edit Orders will delete the tax completely when editing an order. The current routine can only handle an untouched original ot_tax.php
May I suggest - as a real database driven multilanguage tax description support does not seem to be around the corner - that the Edit Orders routine can be changed to support such a scenario as well?