Skip to content

Commit e1b3a61

Browse files
author
Michael Yu
committed
MC-3145: Data migration is broken from bluefoot to mainline pagebuilder
- Updated product renderer to use product list as data-role - Fixed product count to only be 1 instead of using eav to look for display that returns a string which throws a data type error
1 parent f25f5de commit e1b3a61

File tree

1 file changed

+2
-3
lines changed
  • app/code/Magento/PageBuilder/Setup/DataConverter/Renderer

1 file changed

+2
-3
lines changed

app/code/Magento/PageBuilder/Setup/DataConverter/Renderer/Product.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,15 @@ public function render(array $itemData, array $additionalData = []) : string
125125
],
126126
];
127127

128-
$productsCount = $eavData['product_display'] ?? 5;
129128
$conditionsEncoded = $this->conditionsHelper->encode($conditions);
130129
$widgetString = "{{widget type=\"Magento\CatalogWidget\Block\Product\ProductsList\" " .
131130
"template=\"Magento_CatalogWidget::product/widget/content/grid.phtml\" " .
132131
"type_name=\"Catalog Products List\" anchor_text=\"\" id_path=\"\" show_pager=\"0\" " .
133-
"products_count=\"$productsCount\" conditions_encoded=\"$conditionsEncoded\"}}";
132+
"products_count=\"1\" conditions_encoded=\"$conditionsEncoded\"}}";
134133

135134
$rootElementAttributes = [
136135
'data-element' => 'main',
137-
'data-role' => 'product',
136+
'data-role' => 'products',
138137
'data-appearance' => 'grid',
139138
'class' => $eavData['css_classes'] ?? '',
140139
];

0 commit comments

Comments
 (0)