-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAGETWO-39865: [GITHUB] window.checkout is undefined if minicart is r…
…emoved #1458
- Loading branch information
Stanislav Idolov
committed
Jul 10, 2015
1 parent
139997b
commit 6ed9ab3
Showing
4 changed files
with
48 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
app/code/Magento/Checkout/Model/Customer/Autentication/ConfigPlugin.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Checkout\Model\Customer\Autentication; | ||
|
||
class ConfigPlugin | ||
{ | ||
/** | ||
* @var \Magento\Framework\UrlInterface | ||
*/ | ||
protected $urlBuilder; | ||
|
||
/** | ||
* @param \Magento\Framework\UrlInterface $urlBuilder | ||
*/ | ||
public function __construct(\Magento\Framework\UrlInterface $urlBuilder) | ||
{ | ||
$this->urlBuilder = $urlBuilder; | ||
} | ||
|
||
/** | ||
* @param \Magento\Customer\Block\Account\AuthenticationPopup $subject | ||
* @param array $result | ||
* @return array | ||
* | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
public function afterGetConfig( | ||
\Magento\Customer\Block\Account\AuthenticationPopup $subject, | ||
array $result | ||
) { | ||
$result['checkoutUrl'] = $this->urlBuilder->getUrl('checkout'); | ||
return $result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters