Skip to content

Commit

Permalink
MAGETWO-39865: [GITHUB] window.checkout is undefined if minicart is r…
Browse files Browse the repository at this point in the history
…emoved #1458

--fixes after CR
  • Loading branch information
Stanislav Idolov committed Jul 10, 2015
1 parent 121d146 commit 37e1a28
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ define([
authenticationPopup.showModal();
return false;
}
location.href = window.authorizationPopup.checkoutUrl;
location.href = window.authenticationPopup.checkoutUrl;
});

};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Customer\Block\Account;

class AuthorizationPopup extends \Magento\Framework\View\Element\Template
class AuthenticationPopup extends \Magento\Framework\View\Element\Template
{
/**
* @var array
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Customer/view/frontend/layout/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
</block>
<block class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link"
template="account/link/authorization.phtml"/>
<block class="Magento\Customer\Block\Account\AuthorizationPopup" name="authorization-popup" as="authorization-popup" template="account/authorization-popup.phtml">
<block class="Magento\Customer\Block\Account\AuthenticationPopup" name="authentication-popup" as="authentication-popup" template="account/authentication-popup.phtml">
<arguments>
<argument name="jsLayout" xsi:type="array">
<item name="components" xsi:type="array">
<item name="authorizationPopup" xsi:type="array">
<item name="authenticationPopup" xsi:type="array">
<item name="component" xsi:type="string">Magento_Customer/js/view/authentication-popup</item>
<item name="children" xsi:type="array">
<item name="messages" xsi:type="array">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<div id="authorizationPopup" data-bind="scope:'authorizationPopup'">
<li id="authenticationPopup" data-bind="scope:'authenticationPopup'">
<script>
window.authorizationPopup = <?php echo \Zend_Json::encode($block->getConfig()); ?>;
window.authenticationPopup = <?php echo \Zend_Json::encode($block->getConfig()); ?>;
</script>
<!-- ko template: getTemplate() --><!-- /ko -->
<script type="text/x-magento-init">
{
"#authorizationPopup": {
"#authenticationPopup": {
"Magento_Ui/js/core/app": <?php echo $block->getJsLayout();?>
},
"*": {
"Magento_Ui/js/block-loader": "<?php echo $block->getViewFileUrl('images/loader-1.gif'); ?>"
}
}
</script>
</div>
</li>
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ define(
function($, ko, Component, loginAction, customerData, authenticationPopup, $t, url) {
'use strict';
return Component.extend({
registerUrl: window.authorizationPopup.customerRegisterUrl,
forgotPasswordUrl: window.authorizationPopup.customerForgotPasswordUrl,
registerUrl: window.authenticationPopup.customerRegisterUrl,
forgotPasswordUrl: window.authenticationPopup.customerForgotPasswordUrl,
modalWindow: null,
isLoading: ko.observable(false),

Expand All @@ -31,7 +31,7 @@ define(
initialize: function() {
var self = this;
this._super();
url.setBaseUrl(window.authorizationPopup.baseUrl);
url.setBaseUrl(window.authenticationPopup.baseUrl);
loginAction.registerLoginCallback(function() {
self.isLoading(false);
});
Expand Down

0 comments on commit 37e1a28

Please sign in to comment.