Skip to content

Commit 9fa9149

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.3-develop expedited
Accepted Community Pull Requests: - #23725: Fixed an issue where an attribute named length would break the use default value checkbox from saving (by @stijnbernards) - #23926: Use Default Store View Constant instead of '0' (by @edenduong) - #23801: Resolved Can not save "CMS Block" with empty content issue 23800 (by @edenduong) - #20431: fixes-for-schedule-in-admin:: Schedule Update From (Schedule Design U� (by @nadim2jcommerce) - #18624: Add MAGE_RUN_TYPE+MAGE_RUN_CODE to FPC identifier (by @amenk) Fixed GitHub Issues: - #23800: Can not save "CMS Block" with empty content (reported by @edenduong) has been fixed in #23801 by @edenduong in 2.3-develop branch Related commits: 1. 1435253 - #20377: Schedule Update From (Schedule Design Update) not saving When switch store view from admin (reported by @nadim2jcommerce) has been fixed in #20431 by @nadim2jcommerce in 2.3-develop branch Related commits: 1. 6eb9717 2. aa11360
2 parents 89cf888 + 62c2809 commit 9fa9149

File tree

10 files changed

+244
-68
lines changed

10 files changed

+244
-68
lines changed

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

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle;
79

810
use Magento\Framework\Data\Form\Element\AbstractElement;
11+
use Magento\Store\Model\Store;
912

13+
/**
14+
* Block for rendering option of bundle product
15+
*
16+
* Class \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option
17+
*/
1018
class Option extends \Magento\Backend\Block\Widget
1119
{
1220
/**
@@ -79,6 +87,8 @@ protected function _construct()
7987
}
8088

8189
/**
90+
* Return Field Id
91+
*
8292
* @return string
8393
*/
8494
public function getFieldId()
@@ -87,6 +97,8 @@ public function getFieldId()
8797
}
8898

8999
/**
100+
* Return Field Name
101+
*
90102
* @return string
91103
*/
92104
public function getFieldName()
@@ -108,6 +120,8 @@ public function getProduct()
108120
}
109121

110122
/**
123+
* Render
124+
*
111125
* @param AbstractElement $element
112126
* @return string
113127
*/
@@ -118,6 +132,8 @@ public function render(AbstractElement $element)
118132
}
119133

120134
/**
135+
* Set Element
136+
*
121137
* @param AbstractElement $element
122138
* @return $this
123139
*/
@@ -128,6 +144,8 @@ public function setElement(AbstractElement $element)
128144
}
129145

130146
/**
147+
* Get Element
148+
*
131149
* @return AbstractElement|null
132150
*/
133151
public function getElement()
@@ -136,6 +154,8 @@ public function getElement()
136154
}
137155

138156
/**
157+
* Return Is Multi Websites
158+
*
139159
* @return bool
140160
*/
141161
public function isMultiWebsites()
@@ -144,6 +164,8 @@ public function isMultiWebsites()
144164
}
145165

146166
/**
167+
* Prepare Layout
168+
*
147169
* @return $this
148170
*/
149171
protected function _prepareLayout()
@@ -184,6 +206,8 @@ protected function _prepareLayout()
184206
}
185207

186208
/**
209+
* Get Add Button Html
210+
*
187211
* @return string
188212
*/
189213
public function getAddButtonHtml()
@@ -192,6 +216,8 @@ public function getAddButtonHtml()
192216
}
193217

194218
/**
219+
* Get Close Search Button Html
220+
*
195221
* @return string
196222
*/
197223
public function getCloseSearchButtonHtml()
@@ -200,6 +226,8 @@ public function getCloseSearchButtonHtml()
200226
}
201227

202228
/**
229+
* Get Add Selection Button Html
230+
*
203231
* @return string
204232
*/
205233
public function getAddSelectionButtonHtml()
@@ -239,6 +267,8 @@ public function getOptions()
239267
}
240268

241269
/**
270+
* Get Add Button Id
271+
*
242272
* @return mixed
243273
*/
244274
public function getAddButtonId()
@@ -248,6 +278,8 @@ public function getAddButtonId()
248278
}
249279

250280
/**
281+
* Get Options Delete Button Html
282+
*
251283
* @return string
252284
*/
253285
public function getOptionDeleteButtonHtml()
@@ -256,6 +288,8 @@ public function getOptionDeleteButtonHtml()
256288
}
257289

258290
/**
291+
* Get Selection Html
292+
*
259293
* @return string
260294
*/
261295
public function getSelectionHtml()
@@ -264,6 +298,8 @@ public function getSelectionHtml()
264298
}
265299

266300
/**
301+
* Get Type Select Html
302+
*
267303
* @return mixed
268304
*/
269305
public function getTypeSelectHtml()
@@ -286,6 +322,8 @@ public function getTypeSelectHtml()
286322
}
287323

288324
/**
325+
* Get Require Select Html
326+
*
289327
* @return mixed
290328
*/
291329
public function getRequireSelectHtml()
@@ -304,10 +342,12 @@ public function getRequireSelectHtml()
304342
}
305343

306344
/**
345+
* Return Is Default Store
346+
*
307347
* @return bool
308348
*/
309349
public function isDefaultStore()
310350
{
311-
return $this->getProduct()->getStoreId() == '0';
351+
return $this->getProduct()->getStoreId() == Store::DEFAULT_STORE_ID;
312352
}
313353
}

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Bundle\Ui\DataProvider\Product\Form\Modifier;
79

810
use Magento\Bundle\Model\Product\Attribute\Source\Shipment\Type as ShipmentType;
@@ -16,6 +18,7 @@
1618
use Magento\Ui\Component\Form;
1719
use Magento\Ui\Component\Form\Fieldset;
1820
use Magento\Ui\Component\Modal;
21+
use Magento\Store\Model\Store;
1922

2023
/**
2124
* Create Ship Bundle Items and Affect Bundle Product Selections fields
@@ -814,6 +817,6 @@ protected function getSelectionPriceType()
814817
*/
815818
protected function isDefaultStore()
816819
{
817-
return $this->locator->getProduct()->getStoreId() == 0;
820+
return $this->locator->getProduct()->getStoreId() == Store::DEFAULT_STORE_ID;
818821
}
819822
}

0 commit comments

Comments
 (0)