Skip to content

Lack of consistency when pulling related items #32777

Open
@pmarjan

Description

As part of Luma theme, the file

Magento/Catalog/view/frontend/templates/product/list/items.phtml

does provide a renderer for the various type of related products.

However, when deciding whether there is a content to display or not, slightly varied approaches are used.

Current implementation

a. for related items: if ($exist = $block->getItems()->getSize()) {
b. for upsell items: if ($exist = count($block->getItems())) {
c. for crosssell items: if ($exist = count($block->getItems())) {

Perhaps it is better to have a unified way, as for example that is done in the cases for related-rule, upsell-rule and crosssell-rule.

Related Pull Requests

#32778

Metadata

Labels

Area: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Priority: P4No current plan to fix. Fixing can be deferred as a logical part of more important work.Progress: PR in progressReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

  • Status

    Ready for Development

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions