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

add condition to product options #892

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

dhruvi-prajapat1
Copy link

@dhruvi-prajapat1 dhruvi-prajapat1 commented Mar 27, 2025

Preconditions (*)

  1. Magento 2.4.7-p4
  2. page builder v-1.7.5-beta1
  3. page builder v-1.7.5-beta2

Description (*)

When adding a Product Slider through Page Builder and selecting the Product Carousel appearance, an error occurs:
“Error filtering template: Warning: Undefined array key "options" in /var/www/public_html/vendor/magento/module-page-builder/view/frontend/templates/catalog/product/widget/content/carousel.phtml on line 64”

Related Issue(*)

Fixes #891

Manual testing scenarious(*)

  1. Log in to the Magento Admin Panel.
  2. Navigate to Content → Blocks and click on Add New Block.
  3. Click Edit with Page Builder and add a Row.
  4. Expand the Add Content menu and drag the Product widget onto the row.
  5. Click Edit, select a Category, and choose Appearance: Product Carousel.
  6. Save the Edit Products and observe the error.

Expected result (*)

The Product Slider should appear correctly after saving Edit Products.

Actual result (*)

After saving Edit Products an error message is displayed instead of the Product Slider.

Additional Information(*)

As I checked in file magento/module-page-builder /view/frontend/templates/catalog/product/widget/content/carousel.phtml The issue occurs when the product slider does not have a bundle product. At that time, the options are not defined, causing an error.

Checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

@dhruvi-prajapat1
Copy link
Author

@magento run all tests

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

Successfully merging this pull request may close these issues.

Page builder product carousel throws an error.
1 participant