简体   繁体   English

opencart类别数量折扣

[英]opencart category quantity discount

I want to set discount is as follows. 我要设置折扣如下。

Suppose, My one product is for £4.29. 假设,我的一款产品的价格为4.29英镑。 If buyer buys 3 or in multiple of 3 like 3,54,39 or 189 etc, will cost him as £3.33/product. 如果买方购买3或3的倍数,例如3,54,39或189等,则将花费£3.33 /产品。 If buyer buys bulk order other than multiple of three like 4 or 14 or 2 or 38 etc, than it will cost him as regular price of £4.29/product. 如果买方购买的批量订单不是3的倍数,例如4或14或2或38等,则批量订购的正常价格为4.29英镑。

* One product will cost £3.33 only and only if bulk order is made with multiple quantity of 3. * *仅当批量订购的数量为3时,一件产品的价格仅为£3.33。

I found some setting in the discount section of each product. 我在每种产品的折扣部分找到了一些设置。 It works fine as per my requirement. 根据我的要求,它工作正常。 (reffer attached image) (参考图像)

![enter image description here][1] ![在此处输入图片描述] [1]

But it's hard to mention it for each multiple of 3. For Eg. 但是很难提到3的每个倍数。 What if a customer wants to 300 products. 如果客户想要300种产品怎么办。 For that I need to write till the 300. 为此,我需要写到300。

Is there any extension available for this or any one have other solution for this problem. 是否有任何扩展程序可用于此目的,或者任何人都具有针对此问题的其他解决方案。

Thank you for your answer. 谢谢您的回答。

If am getting you right, you are able to calculate discount for all other quantities except for those in multiples of 3. If that is the case, my suggestion is: 如果您做对了,您可以计算除3的倍数以外的所有其他数量的折扣。如果是这种情况,我的建议是:

qty;
if ((qty % 3) == 0) {

// multiply qty by 3.33
price = qty * 3.33;
}
else {
// use your existing (working) formula
}

I hope this works. 我希望这行得通。

twist added into the problem. 扭曲加成问题。

There are three categories with same price. 有三种价格相同的类别。 Assume that its £4.29. 假设它是£4.29。

If a customer buys any of these category product with a total quantity of 3 or multiple of 3 than one product price will be £3.33 If a customer buys 10 products than 9 products will cost him as £3.33/product and remaining 1 product will cost £4.29. 如果客户购买的这些类别产品的总数量为3或3的倍数,则一个产品的价格为£3.33。如果客户购买10个产品,其中9个产品的价格为£3.33 /产品,剩余1个产品的价格为£4.29。

Customer is allowed to buy 3 diffrent products of three different categories or he may buy 2 from one category or 1 from another category. 允许客户购买3种不同类别的3种不同产品,也可以从一种类别中购买2种,或从另一种类别中购买1种。

I hope you guys will understand the problem and give the bestest solution possible. 我希望你们能理解问题并提供最佳解决方案。

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

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