Tax Calculation In MageRewards
Magento 1.3.x.x issues with TAX and VAT
Many Magento bugs were found in Magento 1.3 and fixed in Magento 184.108.40.206. Consequently MageRewards is also susceptible to the same problems when running the older version of Magento.
Fixed #22434: 100% discount of products -> the amounts of Tax and Grand Totals are or negative or not corectly Fixed #22798: Excl and Inc. Tax don’t display on the Estimate Shipping and Tax block Fixed #11412: Rounding error in tax and shipping calculation Fixed #18075: rounding bug while calculating shipping tax (support issue) Fixed #16681: Setting "Display Subtotal" for Tax does not work correctly Fixed #16275: "Back in stock" e-mails do not contain tax Fixed #13571: Tax is ALWAYS calculated Fixed #11228: Bad tax calculation on catalog including VAT with promotions Fixed #10176: Strange price without VAT when using discount<br>
Rewarding customer for catalog prices including tax
MageRewards rewards customers for prices before tax only. It may seem confusing to see in YOUR store $50 => 47 points (if 6% VAT), but the alternative as a default function would be unintuitive as well. This is because on other sections when the tax is 'removed' from the product price, the points will also appear wrong in the other case.
If you really want to award customers for tax, you can increase the amount that customers earn for their purchases in the catalog relative to the price with points. That is, if your tax is 12% = 0.12, then you need to increase your rewarding ration by 1/(1+0.12). So if you reward 1 points for every $10 spent, change this to 10 for every $10/(1+0.12) spent; which is 1 points for every $8.9286 (approx). If you do this, a $50 price including 12% tax would reward the customer 5 points instead of 4 points.
For All Rules
MageRewards basically uses the same methodology as what Magento uses for tax calculation for standard catalog promotion rules and shopping cart promotion rules, so there shouldn’t be any unexpected behavior.
For catalog points rules
Catalog points rules that are applied to a product are executed on the catalog level, so by the time the product is added to the shopping cart the shopping cart calculator will assume that the catalog-discounted prices are permanent. The result is that tax is calculated assuming the discounted price, or whatever price is in the “subtotal” column in shopping cart row. There is no way to change this because this is a direct replication of how Magento performs their own rewards rules. In the example shopping cart image, the tax (1%) is calculated on $36.99 and valued at $0.37 as a result.
It's important to remember that catalog point rules are independent of shopping cart point rules.
Shopping cart rules
Shopping cart points rules are applied to the shopping cart after the products are added and the combination discounts are all applied. As a result, the final shopping cart rules are dependent on the catalog points rules. If a catalog rule gives a discount, the shopping cart rule will give a discount based on the final price after the catalog rules have all taken place.
In the screen shot the the tax rate is 1% and MageRewards will adeptly calculate the points earned and discount applicable for all shopping cart rules on the subtotal amount.
In the Magento system configuration TAX section, you can specify if you want to apply discounts before or after the tax has been added. This option also applies to MageRewards shopping cart point redemption rules (but not catalog point rules). If specified, you may cause he shopping cart redemption rules to be discounted before tax and tax will be calculated after the discount.
With respect to setting up your rules, it's important to note the different logic MageRewards uses in the Shopping Cart when points are being earned. The way earning points are calculated there actually depends on whether or not "Catalog Prices" are set to "Include Tax" in the Admin Configurations > Tax Settings. If catalog prices are set to include tax, MageRewards will award points based on *item price + tax*, otherwise it will be *item price* only. In other words, we look at the *value* entered for price of the product in the Admin Panel and award the shopping cart points based on that. The rational behind this design was so MageRewards can automatically detect whether or not to award points for taxes based on your store settings. In newer versions of Magento, they've introduced a lot of different tax display settings which make this strategy a bit less practical. We plan to change the configuration interface to make this more intuitive in one of our upcoming releases.
Knowing the current logic will probably help you accommodate for taxes in shopping cart earning rules. If you wish to setup a rule which awards customers based on the total spent in cart excluding taxes, you can simply modify your Shopping Cart Earning rule so that it considers a base price without tax amount added when calculating earning points. So for instance, if your tax rate is 10%, and in the rule you have the "Monetary Step (Y) (in base currency)" set to "$1", change it to "$0.91" instead and the math will work out the rest to be accurate.