magento2如何使用总计项目的扩展属性

magento2如何使用总计项目的扩展属性,magento2,Magento2,我正在尝试为totals项目设置新属性,以便在checkout products summary上的product name下面显示它。我想使用“扩展属性”解决方案来解决这个问题。我正在尝试类似于购物车属性,这里描述的内容,但对我来说不起作用。下面是我的代码 app/code/Vendor/Module/etc/extension\u attributes.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" x

我正在尝试为totals项目设置新属性,以便在checkout products summary上的product name下面显示它。我想使用“扩展属性”解决方案来解决这个问题。我正在尝试类似于购物车属性,这里描述的内容,但对我来说不起作用。下面是我的代码

app/code/Vendor/Module/etc/extension\u attributes.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Quote\Api\Data\TotalsItemInterface">
        <attribute code="producer" type="string"/>
    </extension_attributes>
</config>

正如上面链接中的教程所述,它应该生成新版本的
TotalsItemInterface
var/generation目录,但这不会发生。我有开发者模式,我试着清除这个目录,但没有帮助。如何正确使用总计项目的扩展属性