Slider Pro giving error (same ID already exists)

Comments

3 comments

  • Official comment
    Avatar
    Support

    We're actually aware of this issue happening in certain cases, and the dev team is looking into it. We'll be including a fix for it in the next version release. 

    In the meantime, however, try seeing if any of the Parent Products for Best Selling Child Products are disabled, and if there are, try enabling them, as this is a potential cause. 

    Comment actions Permalink
  • Avatar
    Nathan

    Another developer on my team seems to have tracked down the issue.

    The sales_bestsellers_aggregated_yearly table contains multiple years of best seller data. Your plugin is not reading from the table on a yearly basis and instead grabs all products regardless of year. Thus there are multiple entries for the same product because it was a best seller in 2019, 2018, 2017, etc.

    /app/code/WeltPixel/OwlCarouselSlider/Block/Slider/Products.php

    A quick fix was to add a group by clause to the sql query as follows

    $_collection->getSelect()
    ->join(['bestsellers' => $_collection->getTable('sales_bestsellers_aggregated_yearly')],
    'e.entity_id = bestsellers.product_id AND bestsellers.store_id = '.$this->getStoreId(),
    ['qty_ordered','rating_pos','period'])
    ->group('bestsellers.product_id')
    ->order('rating_pos')
    ;

    Can you please confirm this is a defect in your extension?

    Will try and look into your Support suggestion about disabled parents

    0
    Comment actions Permalink
  • Avatar
    Niranga

    Hey,

     

    Did you find a solution for this? I am getting the same error.

    0
    Comment actions Permalink

Please sign in to leave a comment.