Skip to content

Commit 7ab8211

Browse files
committed
Merge pull request #170 from magento-dragons/bugfix
[Dragons] Bugfix
2 parents d1ff85c + cfc3107 commit 7ab8211

File tree

6 files changed

+18
-8
lines changed

6 files changed

+18
-8
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Tab;
77

8+
use Magento\Framework\Api\SimpleDataObjectConverter;
9+
810
/**
911
* Product inventory data
1012
*/
@@ -133,7 +135,7 @@ public function getFieldValue($field)
133135
{
134136
$stockItem = $this->getStockItem();
135137
if ($stockItem->getItemId()) {
136-
$method = 'get' . \Magento\Framework\Api\SimpleDataObjectConverter::snakeCaseToUpperCamelCase($field);
138+
$method = 'get' . SimpleDataObjectConverter::snakeCaseToUpperCamelCase($field);
137139
if (method_exists($stockItem, $method)) {
138140
return $stockItem->{$method}();
139141
}
@@ -149,7 +151,7 @@ public function getConfigFieldValue($field)
149151
{
150152
$stockItem = $this->getStockItem();
151153
if ($stockItem->getItemId()) {
152-
$method = 'getUseConfig' . \Magento\Framework\Api\SimpleDataObjectConverter::snakeCaseToUpperCamelCase(
154+
$method = 'getUseConfig' . SimpleDataObjectConverter::snakeCaseToUpperCamelCase(
153155
$field
154156
);
155157
if (method_exists($stockItem, $method)) {

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
class="select" disabled="disabled">
5151
<option value="1"><?php echo __('Yes') ?></option>
5252
<option
53-
value="0"<?php if ($block->getConfigFieldValue('manage_stock') == 0): ?> selected="selected"<?php endif; ?>><?php echo __('No') ?></option>
53+
value="0"<?php if ($block->getFieldValue('manage_stock') == 0): ?> selected="selected"<?php endif; ?>><?php echo __('No') ?></option>
5454
</select>
5555
</div>
5656
<div class="field choice">

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<div class="control">
2525
<select id="inventory_manage_stock" name="<?php echo $block->getFieldSuffix() ?>[stock_data][manage_stock]" <?php echo $_readonly;?>>
2626
<option value="1"><?php echo __('Yes') ?></option>
27-
<option value="0"<?php if ($block->getConfigFieldValue('manage_stock') == 0): ?> selected="selected"<?php endif; ?>><?php echo __('No') ?></option>
27+
<option value="0"<?php if ($block->getFieldValue('manage_stock') == 0): ?> selected="selected"<?php endif; ?>><?php echo __('No') ?></option>
2828
</select>
2929
<input type="hidden" id="inventory_manage_stock_default" value="<?php echo $block->getDefaultConfigValue('manage_stock'); ?>">
3030
<?php $_checked = ($block->getFieldValue('use_config_manage_stock') || $block->IsNew()) ? 'checked="checked"' : '' ?>

app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<ul data-mage-init='{"menu":[]}'>
2626
<% if (data.items.length) { %>
2727
<% _.each(data.items, function(value){ %>
28-
<li <%- data.optionData(value) %>><a href="#"><%- value.label %></a></li>
28+
<li <%= data.optionData(value) %>><a href="#"><%- value.label %></a></li>
2929
<% }); %>
3030
<% } else { %><span class="mage-suggest-no-records"><%- data.noRecordsText %></span><% } %>
3131
</ul>
@@ -50,7 +50,7 @@
5050
data: {'template_id': data.id}
5151
});
5252
});
53-
53+
5454
$suggest.mage('suggest', <?php echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getSelectorOptions())?>)
5555
.on('suggestselect', function (e, ui) {
5656
$(this).val('');

app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ protected function _prepareLayout()
9999
'downloadable.customer.products.pager'
100100
)->setCollection(
101101
$this->getItems()
102-
);
102+
)->setPath('downloadable/customer/products');
103103
$this->setChild('pager', $pager);
104104
$this->getItems()->load();
105105
foreach ($this->getItems() as $item) {

app/code/Magento/Theme/Block/Html/Pager.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,15 @@ public function getPagerUrl($params = [])
446446
$urlParams['_fragment'] = $this->getFragment();
447447
$urlParams['_query'] = $params;
448448

449-
return $this->getUrl('*/*/*', $urlParams);
449+
return $this->getUrl($this->getPath(), $urlParams);
450+
}
451+
452+
/**
453+
* @return string
454+
*/
455+
protected function getPath()
456+
{
457+
return $this->_getData('path') ?: '*/*/*';
450458
}
451459

452460
/**

0 commit comments

Comments
 (0)