Skip to content

Commit dc88c34

Browse files
author
Leonid Poluyanov
committed
MAGETWO-37246: Price Permissions not apply for configurable variations
1 parent 87003f0 commit dc88c34

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-js-template.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@
149149
<div class="fields-group-2">
150150
<div class="field field-pricing-value">
151151
<div class="control">
152-
<input type="text" class="pricing-value validate-number" <?php if(!$block->getCanEditPrice()) {echo 'disabled="disabled"';}?>
152+
<input type="text" class="pricing-value validate-number" <?php if(!$block->getCanEditPrice()): ?> 'disabled="disabled"' <?php endif; ?>
153153
name="product[configurable_attributes_data][<%- data.attribute.id %>][values][<%- data.option.id %>][pricing_value]" />
154154
</div>
155155
</div>
156156
<div class="field field-pricing-measure">
157157
<div class="actions dropdown actions-select">
158158
<input type="hidden" value="0" name="product[configurable_attributes_data][<%- data.attribute.id %>][values][<%- data.option.id %>][is_percent]"/>
159-
<button type="button" class="action toggle" data-toggle="dropdown" data-mage-init='{"dropdown":{}}' <?php if(!$block->getCanEditPrice()) {echo 'disabled="disabled"';}?>>
159+
<button type="button" class="action toggle" data-toggle="dropdown" data-mage-init='{"dropdown":{}}' <?php if(!$block->getCanEditPrice()): ?> 'disabled="disabled"' <?php endif; ?>>
160160
<span><?php echo $block->getBaseCurrency()->getSymbol() ?></span>
161161
</button>
162162
<ul class="dropdown" data-role="dropdown-menu" data-mage-init='{"menu":{}}'>

app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-template.phtml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,22 +118,17 @@ $id = $block->escapeHtml($attribute['attribute_id']);
118118
<div class="fields-group-2">
119119
<div class="field field-pricing-value">
120120
<div class="control">
121-
<input type="text" <?php if(!$block->getCanEditPrice()) {echo 'disabled="disabled"';}?> class="pricing-value validate-number"
121+
<input type="text" <?php if (!$block->getCanEditPrice()): ?> disabled="disabled";<?php endif; ?> class="pricing-value validate-number"
122122
name="<?php echo $namePrefix ?>[<?php echo $valueIndex ?>][pricing_value]"
123123
value="<?php echo $block->escapeHtml($pricingValue);
124124
?>">
125-
<?php if(!$block->getCanEditPrice()) {
126-
$escapedPricingValue = $block->escapeHtml($pricingValue);
127-
$valueName = $namePrefix . "[$valueIndex][pricing_value]";
128-
echo "<input type='hidden' class='pricing-value validate-number' name='$valueName' value='$escapedPricingValue'>";
129-
}?>
130125
</div>
131126
</div>
132127
<div class="field field-pricing-measure">
133128
<div class="actions dropdown actions-select">
134129
<input name="<?php echo $namePrefix ?>[<?php echo $valueIndex ?>][is_percent]" type="hidden" value="<?php echo $isPercent ? 1 : 0;
135130
?>"/>
136-
<button type="button" class="action toggle" <?php if(!$block->getCanEditPrice()) {echo 'disabled="disabled"';}?> data-toggle="dropdown" data-mage-init='{"dropdown":{}}'>
131+
<button type="button" class="action toggle" <?php if (!$block->getCanEditPrice()): ?> disabled="disabled" <?php endif; ?> data-toggle="dropdown" data-mage-init='{"dropdown":{}}'>
137132
<span><?php echo $isPercent ? __('%') : $block->getBaseCurrency()->getSymbol() ?></span>
138133
</button>
139134
<ul class="dropdown" data-role="dropdown-menu" data-mage-init='{"menu":{}}'>

0 commit comments

Comments
 (0)