首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Prestashop:如何在发票上显示产品折扣

Prestashop:如何在发票上显示产品折扣
EN

Stack Overflow用户
提问于 2012-05-11 18:45:23
回答 1查看 2.5K关注 0票数 1

我希望在我的发票上显示产品和团体折扣。我修改了我的发票,如下所示:

参照|说明|数量|单价|折扣|合计

因此,我需要在与产品相同的行中显示与产品相关的dicount。有什么方法可以做到这一点吗?我已经在谷歌和论坛上搜索过了,但都没有找到答案。

提前谢谢。

EN

回答 1

Stack Overflow用户

发布于 2016-11-30 04:04:00

到了2016年,仍然没有答案。我只是为此而挣扎,过了一段时间,就成功了。我不知道哪个Prestashop是在2012年发布的,但是,我可以给出一些关于prestashop的最新版本的提示,它是今天的1.6.1.9 (我现在的版本)。对于试图在prestashop中修改发票的任何人,您将在pdf文件夹中找到模板文件,文件名为invoice.product-tab.tpl,用于编辑和添加有关产品(价格、税收、折扣等)的字段。你需要知道的就是:

代码语言:javascript
复制
$order_detail.product_name -> returns the name of the product
$order_detail.unit_price_tax_excl_before_specific_price -> returns the price of product without tax and before discount
$order_detail.unit_price_tax_excl_including_ecotax -> returns product price without tax and included eco tax (if there is 1)
$order_detail.order_detail_tax_label -> return the tax percentage
$order_detail.product_quantity -> returns the quantity of orderd product
$order_detail.total_price_tax_incl_including_ecotax - > returns the total amout that is product price + tax

有了这些代码,你可以按百分比或现金计算折扣,你可以在测试中使用它。在.tpl中几乎没有其他的代码,但这不是这个问题的一部分。

希望这对任何人都有帮助。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10549882

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档