Hi,
Adding an extra charge of 1% with a threshold above which the charged amount is flat is possible with the cart fees plugin:
www.hikashop.com/marketplace/product/279-cart-fee.html
With two formulas:
- one with a condition {price}<5000 and a formula {price}*0.01
- one with a condition {price}>=5000 and a formula 50
So that's not a problem.
The big problem you'll have is that there is no mechanism to restrict a formula based on the county. In fact, there is no easy way to know the county based on the address of the user.
It would first require an integration with a paid service like
opencagedata.com/api
to provide the address and get back the county, so that you can then apply the correct charge based on the county (
pointmatch.floridarevenue.com/General/Di...alesSurtaxRates.aspx
)
Also, the surtax might not apply based on the type of product being sold:
floridarevenue.com/taxes/taxesfees/Pages/sales_tax.aspx
For example, if you sell services as well as physical products, you can't blindly take into account the total amount of the order, but only the portion for the type of product for which the surtax applies.
So, if you want to get a complete solution, handling both the product type and different rates for different counties, with a threshold, I'm afraid the only solution is to develop a custom plugin to handle this.
By implementing the onHikashopGetTax(&$obj, $zone_id, $tax_category_id, $type, &$matches, &$taxPlans) event in a hikashop plugin, you can force the list of taxes in $obj->taxRates (with objects similar to what you have in $matches or $taxPlans), empty $matches and $taxPlans and the system will us your tax rate objects to calculate the tax. And to base yourself on the user address, you can load the cart address:
$checkoutHelper = hikashopCheckoutHelper::get();
$cart = $checkoutHelper->getCart();
echo $cart->shipping_address->address_city;
That way, you can pass the address to the API of the service to get back the county name.
And you can use $tax_category_id to check the type of product.
And then, you need to implement the event onAfterCartShippingLoad(&$cart) to check if the surtax calculated goes above the threshold and if so you can force the value and recalculate the total.
So, if you're a skilled developer, or can hire one, with the information above, it should be totally possible to do it. It's not simple though and it will require at least a few days of work, if not a few weeks.
A better solution would be to use TaxCloud:
www.hikashop.com/support/documentation/260-taxcloud.html
The integration plugin is included for free in HikaShop. And with it, TaxCloud will calculate the taxes for your products based on their TIC and the address of the user.