doudou6719
2018-02-08 21:16
浏览 85
已采纳

在prestashop 1.7中添加折扣

I am working on prestashop 1.7. I have added some products to cart through php code using prestashops provided classes. In older prestashop versions there is a function called addDiscounts in the cart class that can be used to add the discounts to shopping cart. But in prestashop 1.7 it says cannot find this function in cart class. After going through the class I couldn't find it myself. Any idea what has replaced this function or was it added somewhere else?

图片转代码服务由CSDN问答提供 功能建议

我正在使用prestashop 1.7。 我已经使用prestashops提供的类通过php代码添加了一些产品到购物车。 在较早的prestashop版本中,购物车类中有一个名为addDiscounts的功能,可用于将折扣添加到购物车。 但是在prestashop 1.7中它表示无法在购物车类中找到此功能。 通过课程后,我自己找不到。 知道什么已经取代了这个功能,还是在其他地方添加了?

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dqef7931 2018-02-08 22:07
    已采纳

    I found the answer to this question. The function addDiscount has been renamed to addcartrule with the argument as the cartrule id. Cheers.

    已采纳该答案
    评论
    解决 无用
    打赏 举报