简体   繁体   English

Magento最低订单金额有折扣

[英]Magento minimum order amount with discount

On Magento shop system, We have a campaign running now offering 50€ discount on orders above 100€. 在Magento商店系统上,我们现在开展一项活动,在100欧元以上的订单上提供50欧元的折扣。 The coupon does not work on orders between 100€ and 125€ because the shop's minimum order value is 75€. 优惠券不适用于100欧元到125欧元之间的订单,因为该商店的最低订单价值为75欧元。 The coupon rule checks the subtotal of the cart after the discount has been applied. 优惠券规则在应用折扣后检查购物车的小计。

The logic of minimum order amount is implemented in the model "Sales/Quote". 最小订单金额的逻辑在“销售/报价”模型中实施。 You may find the function validateMinimumAmount in the Mage/Sales/Model/Quote.php 您可以在Mage / Sales / Model / Quote.php中找到函数validateMinimumAmount

If your website doesn't support multiple address shipping, you may only need to look into the function validateMinimumAmount in the Mage/Sales/Model/Quote/Address.php 如果您的网站不支持多地址发送,您可能只需要查看Mage / Sales / Model / Quote / Address.php中的 validateMinimumAmount函数。

For example, for Magento 1.7.0.2, it will locate at line. 例如,对于Magento 1.7.0.2,它将位于线上。 1025. I think change the snippet 1025.我想改变片段

if ($this->getBaseSubtotalWithDiscount() < $amount) {

to

if ($this->getBaseSubtotal() < $amount) {

.

However, it's highly recommended not to modify the core code directly. 但是,强烈建议不要直接修改核心代码。 That's to say, you may need to create a module to rewrite the model. 也就是说,您可能需要创建一个模块来重写模型。

BTW, all the code above is not tested. 顺便说一下,上面的所有代码都没有经过测试。

Hope that helps. 希望有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM