0

当我在 Akeneo 2.1.4 中使用产品模型时,我在标签列中看到了产品模型的代码。但我想在那里显示特定属性的值;name例如或group name。我怎样才能做到这一点?

编辑:

我尝试扩展类并用我自己的方式重写它entities.yml

parameters:
    # Rewrite product model so we can override the getLabel()-method:
    pim_catalog.entity.product_model.class: Vendor\Bundle\AppBundle\Model\ProductModel

但后来我得到了错误:

The class 'Vendor\Bundle\AppBundle\Model\ProductModel' was not found in the chain configured namespaces 
    Gedmo\Tree\Entity, 
    Oro\Bundle\ConfigBundle\Entity, 
    Oro\Bundle\UserBundle\Entity, 
    Pim\Bundle\CustomEntityBundle\Entity, 
    FOS\OAuthServerBundle\Entity, 
    Pim\Bundle\UserBundle\Entity, 
    Pim\Bundle\ApiBundle\Entity, 
    Pim\Bundle\CatalogBundle\Entity, 
    Pim\Bundle\CommentBundle\Entity, 
    Pim\Bundle\DataGridBundle\Entity, 
    Pim\Bundle\NotificationBundle\Entity, 
    Akeneo\Component\Batch\Model, 
    Akeneo\Component\BatchQueue\Queue, 
    Akeneo\Component\FileStorage\Model, 
    Pim\Component\Catalog\Model, 
    Akeneo\Component\Versioning\Model
4

1 回答 1

0

您无需编写自定义代码即可实现此目的。在 Akeneo PIM 中,您可以定义您的哪一个家庭属性将用作网格上的标签。

当您编辑您的家庭之一时,您可以选择所需的属性: 在此处输入图像描述

选择后,您可以保存您的家庭,所选属性将用作网格中的标签(仅适用于显然属于该家庭的产品)。

如果我不明白你的真正问题,请告诉我。

于 2018-03-20T16:43:00.973 回答