【问题标题】:debug shopware6 document pdf调试 shopware6 文档 pdf
【发布时间】:2022-12-16 12:56:29
【问题描述】:

我们如何调试 shopware6 pdf 生成? {{ dump() }} 将不起作用,不会生成 pdf。然后我们得到一个错误:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '0')

有没有可能?也许我们可以得到 html 而不是 pdf 来找到我们要找的东西?

【问题讨论】:

    标签: shopware shopware6


    【解决方案1】:

    请参阅OrderDocumentCriteriaFactory,其订单关联在模板中可用。如果您计划与某个协会合作,请注意它们必须添加到该标准中并且也可以为空。添加过多的健全性检查比假设所有订单都会与每个关联一起来更好。

    另见DocumentTemplateRenderer。如果在呈现 twig 模板时抛出异常,则可以在此处捕获异常以进行进一步调试。

    【讨论】:

      【解决方案2】:

      您可以使用 WYSIWYG Document Editor 通过拖放直观地自定义您的 Shopware 6 文档。您可以在左侧边栏中浏览和搜索所有可用变量。这比一般使用 Twig 容易得多,并且节省了大量时间。

      Variable Search in the Shopware 6 WYSIWYG Document Editor App

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-08-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-11-29
        • 2011-05-19
        相关资源
        最近更新 更多