Skip to content

Commit dbabe3d

Browse files
committed
MAGETWO-44109: Import Custom Options grid contains Downloadable product if Import Custom Options for Simple product
1 parent 0766aea commit dbabe3d

File tree

3 files changed

+6
-3
lines changed
  • app/code/Magento/Catalog

3 files changed

+6
-3
lines changed

app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,4 +461,9 @@ public function getCustomOptionsUrl()
461461
{
462462
return $this->getUrl('catalog/*/customOptions');
463463
}
464+
465+
public function getCurrentProductId()
466+
{
467+
return $this->getProduct()->getId();
468+
}
464469
}

app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Popup/Grid.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ protected function _prepareCollection()
7575
null
7676
);
7777

78-
$this->_productFactory->create()->getMediaGalleryEntries();
79-
8078
return $this;
8179
}
8280

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jQuery(function ($) {
9797
'customOptionsUrl' => $block->getCustomOptionsUrl(),
9898
'isReadonly' => $block->isReadonly(),
9999
'itemCount' => $block->getItemCount(),
100-
'currentProductId' => $block->getRequest()->getParam('id'),
100+
'currentProductId' => $block->getCurrentProductId(),
101101
]
102102
)?>);
103103
//adding data to templates

0 commit comments

Comments
 (0)