-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Lack of consistency when pulling related items #32777
Comments
Hi @pmarjan. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. Please, add a comment to assign the issue:
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @pmarjan. Thank you for working on this issue.
|
Hi @engcom-Lima. Thank you for working on this issue.
|
Verified the inconsistency in file Magento/Catalog/view/frontend/templates/product/list/items.phtml on Magento 2.4-develop instance. |
Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Once all required labels are present, please add |
✅ Jira issue https://jira.corp.magento.com/browse/AC-699 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Lima. Thank you for verifying the issue. |
❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.magento.com/browse/AC-699 |
1 similar comment
❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.magento.com/browse/AC-699 |
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
andcrosssell-rule
.Related Pull Requests
#32778
The text was updated successfully, but these errors were encountered: