Skip to content

Commit

Permalink
SMM-5 - Fix displaying and saving issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Patryk Bura committed Jan 24, 2025
1 parent 6378700 commit 2821aac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Block/Adminhtml/Edit/Tab/Nodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ private function renderNodeList($level, $parent, $data)
foreach ($nodes as $node) {
$menu[] = [
'is_active' => $node->getIsActive(),
'hide_if_empty' => $node->getHideIfEmpty(),
'is_stored' => true,
'type' => $node->getType(),
'content' => $node->getContent(),
Expand Down
1 change: 1 addition & 0 deletions Service/Menu/SaveRequestProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ private function processNodeObject(
$nodeObject->setMenuId($menu->getMenuId());
$nodeObject->setTitle($nodeData['title']);
$nodeObject->setIsActive($nodeData['is_active'] ?? '0');
$nodeObject->setHideIfEmpty($nodeData['hide_if_empty'] ?? '0');
$nodeObject->setLevel((string) $level);
$nodeObject->setPosition((string) $position);

Expand Down
4 changes: 2 additions & 2 deletions view/adminhtml/templates/menu/nodes.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ $vueComponents = $block->getVueComponents();
"product" : "<?= __('Product') ?>",
"productId" : "<?= __('Product ID') ?>",
"imageAltText" : "<?= __('Image Alt text') ?>",
"imageWidth" : "<?= __('Image Width') ?>",
"imageHeight" : "<?= __('Image Height') ?>",
"imageWidth" : "<?= __('Image Width') ?>",
"imageHeight" : "<?= __('Image Height') ?>",
"selectedItemId" : "<?= __('Selected Item Id') ?>",
"customerGroups" : "<?= __('Customer Groups') ?>",
"customerGroupsDescription" : "<?= __('If no customer group is selected, the node will be visible to all customers.') ?>",
Expand Down

0 comments on commit 2821aac

Please sign in to comment.