Remove tax if over x value in magento
Hello :) Can anyone help me how to r开发者_JAVA技巧emove shipping value, if the total order is over 100 euro for example.
So if the order i under 100 euro, there need to be a extra shipping tax, but if the order is over 100 euro, there don't need to be a shipping tax.
Hope someone can help :-)
If I'm understanding your question correctly your wanting to change tax rates based off the order total? NY, USA has something similar to this called Luxury Tax I had to find a means to do such. Here's what I found, as it may not be a direct solution to your problem but can at least give you a starting point code wise. Obviously exhaust all core abilities of Magento first to make sure its NOT possible before attempting such, as there may be a means without code changes, more details on your question would help, anyhow...
protected function _unitBaseCalculation($item, $request)
{
// If USD and from NY Region, apply tax rate based on grand total
if(Mage::app()->getStore()->getCurrentCurrencyCode() == "USD" && $request['region_id'] == "43") {
if($item['discount_amount'] != 0) {
$package_id = Mage::getModel('catalog/product')->load($item['product_id'])->getAttributeText('package_id');
if($package_id == "SHOES") {
$price_minus_discount = $item['price'] - $item['discount_amount'];
if($price_minus_discount < 110) {
//$rate = "4.375";
$item->getProduct()->setTaxClassId('7');
} else {
//$rate = "8.875";
$item->getProduct()->setTaxClassId('6');
}
}
}
http://www.molotovbliss.com/ny-luxury-taxes-with-discounts-and-magento
精彩评论