Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProductCarousel for related products show 7000+ Products #11

Open
tim-breitenstein-it opened this issue Dec 14, 2022 · 2 comments
Open

Comments

@tim-breitenstein-it
Copy link

For some reasons our ProductCarousel show more then 7000 products.

The catalog_product_link Table is empty so I think the products are taking out from ElasticSearch Index.

I think it´s very good to set a limit:

https://github.com/magesuite/content-constructor-frontend/blob/3.x/Model/Component/ProductCarousel.php

    public function getProducts() {
        if($this->products === null) {
+           $this->setData('limit', 20);
            $this->products = $this->dataProvider->getProducts($this->getData(), true);
        }

        return $this->products;
    }
@tim-breitenstein-it tim-breitenstein-it changed the title ProductCarousel show 7000+ Products ProductCarousel for related products show 7000+ Products Dec 14, 2022
@diwipl
Copy link
Contributor

diwipl commented Dec 14, 2022

Hi

Product carousel accepts limit in data passed to the component:

https://github.com/magesuite/content-constructor-frontend/blob/5.x/DataProviders/ProductCarouselDataProvider.php#L317

And by default in the Content Constructor product carousel configuration that limit is set to 20:
image

@tim-breitenstein-it
Copy link
Author

tim-breitenstein-it commented Dec 14, 2022

But where I set this limit for the after 'Add to Cart' product carousel popup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants