Apply Discount After Taxes config not working
- PolishedGeek
-
Topic Author
- Offline
- Official HikaShop Development Partner
Less
More
12 years 4 weeks ago - 12 years 4 weeks ago #169298
by PolishedGeek
~ Deb Cinkus, CEO
Polished Geek: more with monday․com
eCommerce Business Process Automation Experts
Apply Discount After Taxes config not working was created by PolishedGeek
-- HikaShop version -- : HikaShop Business: 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.3 (dev server)
-- Browser(s) name and version -- : All
-- Error-message(debug-mod must be tuned on) -- : Website is in offline mode during development. I am attaching screenshots of the problem.
Our client offers employer-subsidized healthcare items, vitamins, etc. The employer pays 80% of the retail cost of the products. Their employees (the store customers) must pay the full amount of taxes, calculated on the retail price.
Not all products are subsidized, so we can't simply do a discount at checkout, it must be by product category.
So we need to configure this for example:
----
Retail price = $11.70 each
Tax (8%) = $0.94
Less 80% discount on retail price = -$9.36 each
----
Final price of the item = $2.34 each
Taxes based on retail, before discount = $0.94
Total paid by customer at checkout = $3.28 each
----
In summary, what we need is Retail Price + (Retail Price x Tax) - (Retail Price x Discount) = Final price
---
What we are getting in the checkout, however, is
Retail Price + [(Retail Price - Discount) x Tax] = Final price
We have a test product set up (see screenshots) that shows the full retail and the discounted price, and you can see with the math in the checkout that discounts are being applied differently than what we are trying to achieve.
How can this be done, so we will get Retail Price + (Retail Price x Tax) - (Retail Price x Discount) = Final price ?
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.3 (dev server)
-- Browser(s) name and version -- : All
-- Error-message(debug-mod must be tuned on) -- : Website is in offline mode during development. I am attaching screenshots of the problem.
Our client offers employer-subsidized healthcare items, vitamins, etc. The employer pays 80% of the retail cost of the products. Their employees (the store customers) must pay the full amount of taxes, calculated on the retail price.
Not all products are subsidized, so we can't simply do a discount at checkout, it must be by product category.
So we need to configure this for example:
----
Retail price = $11.70 each
Tax (8%) = $0.94
Less 80% discount on retail price = -$9.36 each
----
Final price of the item = $2.34 each
Taxes based on retail, before discount = $0.94
Total paid by customer at checkout = $3.28 each
----
In summary, what we need is Retail Price + (Retail Price x Tax) - (Retail Price x Discount) = Final price
---
What we are getting in the checkout, however, is
Retail Price + [(Retail Price - Discount) x Tax] = Final price
We have a test product set up (see screenshots) that shows the full retail and the discounted price, and you can see with the math in the checkout that discounts are being applied differently than what we are trying to achieve.
How can this be done, so we will get Retail Price + (Retail Price x Tax) - (Retail Price x Discount) = Final price ?
~ Deb Cinkus, CEO
Polished Geek: more with monday․com
eCommerce Business Process Automation Experts
Last edit: 12 years 4 weeks ago by PolishedGeek. Reason: adding attachments
Please Log in or Create an account to join the conversation.
12 years 4 weeks ago #169367
by nicolas
Replied by nicolas on topic Apply Discount After Taxes config not working
Hi,
The discounts in percentage of the products will be calculated the same way regardless of the "apply discount" option of the configuration.
If you want to change the behavior of that, you need to look at the function addDiscount of the file administrator/components/com_hikashop/classes/currency.php
I guess that you'll want to avoid the calls to the getTaxedPrice function which recalculates the taxes after the discount is applied to the product price.
The discounts in percentage of the products will be calculated the same way regardless of the "apply discount" option of the configuration.
If you want to change the behavior of that, you need to look at the function addDiscount of the file administrator/components/com_hikashop/classes/currency.php
I guess that you'll want to avoid the calls to the getTaxedPrice function which recalculates the taxes after the discount is applied to the product price.
The following user(s) said Thank You: PolishedGeek
Please Log in or Create an account to join the conversation.
Time to create page: 0.144 seconds