I am used to be able to set the "Related Product" limits in /app/design/frontend/theme/theme/Magento_Catalog/product/list/items.phtml

by changing

case 'related':
    /** @var \Magento\Catalog\Block\Product\ProductList\Related $block */
    if ($exist = $block->getItems()->getSize()) {
        $type = 'related';
        $class = $type;

        $image = 'related_products_list';
        $title = __('Related Products');
        $items = $block->getItems();
        $limit = 4;
        $shuffle = 0;
        $canItemsAddToCart = $block->canItemsAddToCart();

        $showAddTo = false;
        $showCart = false;
        $templateType = null;
        $description = false;

Notice the $limit = 4;

However, in Magento 2.3.2, this method no longer seems to be an option. On desktop, I will get at least 6 images per row, with what appears as no no limit on the total number of items listed.

In the EE version, it seems to be easy to set, but the CE version, I can't figure out where to limit the number of items, as well as how the display. EG if there are 4 related products, they float left, or it seems as such. Centered would be ideal, but so much has changed that I am at a loss to figure out how to 1) limit "Related Products" 2) affect their display on a page (position.size/etc.) or 3) where to even begin.

If anyone has an idea, suggestions are appreciated. Apparently 2.2 vs 2.3 are wildly different products.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.