magento2-page-builder
magento2-page-builder copied to clipboard
add condition to product options
Preconditions (*)
- Magento 2.4.7-p4
- page builder v-1.7.5-beta1
- 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(*)
- Log in to the Magento Admin Panel.
- Navigate to Content → Blocks and click on Add New Block.
- Click Edit with Page Builder and add a Row.
- Expand the Add Content menu and drag the Product widget onto the row.
- Click Edit, select a Category, and choose Appearance: Product Carousel.
- 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)