仅在 PrestaShop 购物车中进行个人定制的折扣 [英] Discount for individual customization only in PrestaShop shopping cart

查看:53
本文介绍了仅在 PrestaShop 购物车中进行个人定制的折扣的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Pedram 在产品定制的折扣方面存在问题.

Pedram poses a problem regarding discounts for product customizations.

示例

如果您应用 100 件的特定价格,假设有 5% 的折扣,并且您添加了 50 件带有 print A 的 T 恤和 50 件带有 print B,您可以获得折扣.但实际上,一张印刷品只售出 50 件.所以不应该有任何折扣(也许在我看来).

If you apply a specific price for 100 pieces, let's say 5% discount, and you add 50 t-shirts with print A and 50 t-shirts with print B, you get a discount. But in reality only 50 pieces of one print production is sold. So there shouldn't been any discount (perhaps in my opinion).

举个疯狂的例子,假设我们有 100 种不同的印刷品,那么您必须设置印刷生产 100 次!而且100件的折扣已经不合适了.

Let's take a crazy example, say we have 100 different prints, then you would have to set up the printing production 100 times! And there for the discount for 100 pieces is not appropriate anymore.

问题

如何让折扣(特定价格)仅适用于购物车中的单个customization?

How can I make discounts (specific price) only apply to an indivual customization in the cart?

进一步思考

我的猜测是它应该在核心的某个地方进行更改.希望不要侵入类覆盖.设置 PS_QTY_DISCOUNT_ON_COMBINATION 告诉我们折扣是应用于整个产品还是仅应用于组合.这个设置在SpecificPriceCore::getSpecificPrice()中使用,似乎不是解决这个问题的关键.

My guess is that it should be changed somewhere in the core. Hopefully with a not to invasive class override. The setting PS_QTY_DISCOUNT_ON_COMBINATION tells if a discount should apply to the whole product or only to the combination. This setting is used in SpecificPriceCore::getSpecificPrice(), and doesn't seem to be the key in solving this problem.

推荐答案

虽然组合是可能的,但不幸的是为自定义设置一个特定的价格(不要混淆)Core 中尚不支持.

While it's possible combinations, setting a specific price for customizations (not to be confused) is unfortunately is not yet supported in the Core.

看起来这不能通过覆盖来完成,因为您可能需要向 getSpecificPrice() 等添加一个新参数.

It looks that this cannot be done by means of an override because you'd probably need to add a new parameter to getSpecificPrice(), among others.

如果您希望将此功能添加到核心(分支开发 1.7),请随时提交拉取请求,或者 为锻造添加一张票.

Feel free to submit a pull request if you want this feature added to the Core (branch develop for 1.7), or add a ticket to the forge.

这篇关于仅在 PrestaShop 购物车中进行个人定制的折扣的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆