如果magento中的值超过x值,则取消税收

发布于 2024-10-19 08:24:12 字数 133 浏览 2 评论 0原文

你好 :) 任何人都可以帮助我如何删除运费,例如,如果订单总额超过 100 欧元。

因此,如果订单金额低于 100 欧元,则需要额外缴纳运费税,但如果订单金额超过 100 欧元,则无需缴纳运费税。

希望有人可以帮忙:-)

Hello :)
Can anyone help me how to remove 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 :-)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

厌倦 2024-10-26 08:24:12

如果我正确理解您的问题,您想根据订单总额更改税率吗?美国纽约有类似的东西,称为奢侈税,我必须找到一种方法来做到这一点。这是我发现的,因为它可能不能直接解决您的问题,但至少可以为您提供一个明智的起点代码。显然,首先要耗尽 Magento 的所有核心功能,以确保在尝试之前不可能,因为可能有一种无需更改代码的方法,无论如何,有关您问题的更多详细信息都会有所帮助......

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文