Skip to content

Commit 820f306

Browse files
committed
Merge pull request #72 from magento-vanilla/PR
[Vanilla] Bug Fixes
2 parents f748e57 + 177723d commit 820f306

File tree

25 files changed

+586
-325
lines changed

25 files changed

+586
-325
lines changed

app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml

Lines changed: 104 additions & 136 deletions
Large diffs are not rendered by default.

app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ $product = $block->getSaleableItem();
2222
<?php foreach ($tierPrices as $index => $price) : ?>
2323
<li class="item">
2424
<?php
25-
$popupId = 'msrp-popup-' . $product->getId() . $block->getRandomString(20);
25+
$productId = $product->getId();
26+
$popupId = 'msrp-popup-' . $productId . $block->getRandomString(20);
2627
if ($msrpShowOnGesture && $price['price']->getValue() < $product->getMsrp()):
2728
$addToCartUrl = '';
2829
if ($product->isSaleable()) {
@@ -54,7 +55,8 @@ $product = $block->getSaleableItem();
5455
}
5556
?>
5657
<?php /* @escapeNotVerified */ echo __('Buy %1 for: ', $price['price_qty']); ?>
57-
<a href="#" id="<?php /* @escapeNotVerified */ echo($popupId);?>"
58+
<a href="javascript:void(0);"
59+
id="<?php /* @escapeNotVerified */ echo($popupId);?>"
5860
data-tier-price="<?php echo $block->escapeHtml($block->jsonEncode($tierPriceData)); ?>">
5961
<?php /* @escapeNotVerified */ echo __('Click for price'); ?></a>
6062
<?php else:
@@ -87,9 +89,13 @@ $product = $block->getSaleableItem();
8789
{
8890
".product-info-main": {
8991
"addToCart": {
92+
"origin": "tier",
93+
"addToCartButton": "#product_addtocart_form [type=submit]",
9094
"inputQty": "#qty",
9195
"attr": "[data-tier-price]",
92-
"productForm": "#product_addtocart_form"
96+
"productForm": "#product_addtocart_form",
97+
"productId": "<?php /* @escapeNotVerified */ echo $productId; ?>",
98+
"productIdInput": "input[type=hidden][name=product]"
9399
}
94100
}
95101
}

app/code/Magento/Catalog/view/frontend/requirejs-config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ var config = {
1111
relatedProducts: 'Magento_Catalog/js/related-products',
1212
upsellProducts: 'Magento_Catalog/js/upsell-products',
1313
productListToolbarForm: 'Magento_Catalog/js/product/list/toolbar',
14-
tierPrice: 'Magento_Catalog/js/tier-price',
15-
addToCart: 'Magento_Msrp/js/msrp',
1614
catalogGallery: 'Magento_Catalog/js/gallery',
1715
priceBox: 'Magento_Catalog/js/price-box',
1816
priceOptionDate: 'Magento_Catalog/js/price-option-date',

app/code/Magento/Checkout/view/frontend/templates/cart/item/configure/updatecart.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</div>
2323
<?php endif; ?>
2424
<div class="actions">
25-
<button type="button"
25+
<button type="submit"
2626
title="<?php /* @escapeNotVerified */ echo $buttonTitle ?>"
2727
class="action primary tocart"
2828
id="product-updatecart-button">

app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/config.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</div>
3737
</div>
3838
</div>
39-
<fieldset class="fieldset">
39+
<div class="fieldset">
4040
<?php echo $block->getChildHtml('matrix'); ?>
4141

4242
<!-- Select Associated Product popup -->
@@ -53,7 +53,7 @@
5353
</div>
5454

5555
<input type="hidden" name="affect_configurable_product_attributes" value="1" />
56-
</fieldset>
56+
</div>
5757
</div>
5858
<script type="text/x-magento-init">
5959
{

app/code/Magento/Msrp/view/base/templates/product/price/msrp.phtml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,30 +54,33 @@ if ($product->isSaleable()) {
5454
$priceElementId = $priceElementIdPrefix . $productId . $block->getIdSuffix();
5555
$popupId = 'msrp-popup-' . $productId . $block->getRandomString(20);
5656
$data = ['addToCart' => [
57+
'origin'=> 'msrp',
5758
'popupId' => '#' . $popupId,
5859
'productName' => $product->getName(),
60+
'productId' => $productId,
61+
'productIdInput' => 'input[type="hidden"][name="product"]',
5962
'realPrice' => $block->getRealPriceHtml(),
6063
'isSaleable' => $product->isSaleable(),
6164
'msrpPrice' => $msrpPrice,
6265
'priceElementId' => $priceElementId,
6366
'closeButtonId' => '#map-popup-close',
64-
'popupCartButtonId' => '#map-popup-button',
6567
'addToCartUrl' => $addToCartUrl,
68+
'paymentButtons' => '[data-label=or]'
6669
]];
6770
if ($block->getRequest()->getFullActionName() === 'catalog_product_view') {
6871
$data['addToCart']['addToCartButton'] = '#product_addtocart_form [type=submit]';
6972
} else {
70-
$data['addToCart']['cartForm'] = sprintf(
71-
'form:has(input[type="hidden"][name="product"][value="%s"])',
73+
$data['addToCart']['addToCartButton'] = sprintf(
74+
'form:has(input[type="hidden"][name="product"][value="%s"]) button[type="submit"]',
7275
(int) $productId
7376
);
7477
}
7578
?>
7679
<span id="<?php /* @escapeNotVerified */ echo $block->getPriceId() ? $block->getPriceId() : $priceElementId ?>" style="display:none"></span>
77-
<a href="#"
80+
<a href="javascript:void(0);"
7881
id="<?php /* @escapeNotVerified */ echo($popupId);?>"
7982
class="action map-show-info"
80-
data-mage-init="<?=$block->escapeHtml($this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($data))?>"><?php /* @escapeNotVerified */ echo __('Click for price'); ?>
83+
data-mage-init='<?= /* @escapeNotVerified */ $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($data)?>'><?php /* @escapeNotVerified */ echo __('Click for price'); ?>
8184
</a>
8285
<?php else: ?>
8386
<span class="msrp-message">
@@ -87,10 +90,11 @@ if ($product->isSaleable()) {
8790

8891
<?php if ($block->getZone() == \Magento\Framework\Pricing\Render::ZONE_ITEM_VIEW): ?>
8992
<?php $helpLinkId = 'msrp-help-' . $productId . $block->getRandomString(20); ?>
90-
<a href="#"
93+
<a href="javascript:void(0);"
9194
id="<?php /* @escapeNotVerified */ echo $helpLinkId;?>"
9295
class="action map-show-info"
93-
data-mage-init='{"addToCart":{"helpLinkId": "#<?php /* @escapeNotVerified */ echo $helpLinkId;?>",
96+
data-mage-init='{"addToCart":{"origin": "info",
97+
"helpLinkId": "#<?php /* @escapeNotVerified */ echo $helpLinkId;?>",
9498
"productName": "<?php /* @escapeNotVerified */ echo $product->getName() ?>",
9599
"closeButtonId": "#map-popup-close"}}'><span><?php /* @escapeNotVerified */ echo __("What's this?"); ?></span>
96100
</a>

0 commit comments

Comments
 (0)