【问题标题】:Issue with the category Id in Magento 1.9.2Magento 1.9.2 中的类别 ID 问题
【发布时间】:2017-02-20 22:22:56
【问题描述】:

magento 版本从 1.7.2 升级到 1.9.2 后,我遇到了这个问题,具有相同 id “235”的项目(Mage_Catalog_Model_Category)已经存在,请任何人提出这里的问题是什么?

谢谢

【问题讨论】:

    标签: magento-1.9 magento-1.8


    【解决方案1】:

    集合具有相同的 id,因此您可以在集合末尾使用以下代码

    $collection->getSelect()->distinct(true);
    

    $collection->getSelect()->group('e.entity_id');
    

    【讨论】:

    • 感谢您的回复,但在哪个文件中?
    • 您必须将给定的代码添加到您编写自定义集合代码的文件中。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-04-06
    • 1970-01-01
    • 2020-03-05
    • 1970-01-01
    • 1970-01-01
    • 2015-12-02
    • 2014-09-22
    相关资源
    最近更新 更多