How to select specific fields with aliases using joinTable or joinField in Magento

前端 未结 3 1269
迷失自我
迷失自我 2021-02-15 06:29

I want to pre-filter* data in the invoice grid visible in Magento\'s admin panel.

Here is a question that I asked earlier, and this one is related to the solution prese

3条回答
  •  [愿得一人]
    2021-02-15 07:00

    The error "A joint field with this alias (0) is already declared." occurs because it uses array keys as aliases. Since you have two joinTable() calls, each with an array, it is trying to use the zero-based index of both and obviously having a conflict.
    So instead of

    array('entity_id as order_entity_id')
    

    try

    array('entity_id' => 'order_entity_id')
    

    to avoid the conflict.

提交回复
热议问题