-
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.
Merge pull request #578 from magento-troll/troll_bugfix
MAGETWO-54365 [GitHub] Bundle Products - The price calculation fails for user defined quantity #4446 MAGETWO-47017 [Github] Add Configurable Product To Cart from Category Page #2574 #5850 #5882 #6572 #5558 #4184
- Loading branch information
Showing
50 changed files
with
1,511 additions
and
57 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
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
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
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
17 changes: 17 additions & 0 deletions
17
app/code/Magento/Swatches/view/frontend/web/js/catalog-add-to-cart.js
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,17 @@ | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
require([ | ||
'jquery' | ||
], function ($) { | ||
'use strict'; | ||
|
||
$('body').on('catalogCategoryAddToCartRedirect', function (event, data) { | ||
$(data.form).find('[name*="super"]').each(function (index, item) { | ||
var $item = $(item); | ||
|
||
data.redirectParameters.push($item.attr('data-attr-name') + '=' + $item.val()); | ||
}); | ||
}); | ||
}); |
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
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
35 changes: 35 additions & 0 deletions
35
dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Summary.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,35 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Bundle\Test\Block\Catalog\Product\View; | ||
|
||
use Magento\Bundle\Test\Block\Catalog\Product\View\Summary\ConfiguredPrice; | ||
|
||
/** | ||
* Bundle Summary block. | ||
*/ | ||
class Summary extends \Magento\Catalog\Test\Block\Product\View | ||
{ | ||
/** | ||
* Configured Price block selector. | ||
* | ||
* @var string | ||
*/ | ||
private $configuredPriceBlockSelector = '.price-configured_price'; | ||
|
||
/** | ||
* Get configured price block. | ||
* | ||
* @return ConfiguredPrice | ||
*/ | ||
public function getConfiguredPriceBlock() | ||
{ | ||
return $this->blockFactory->create( | ||
ConfiguredPrice::class, | ||
['element' => $this->_rootElement->find($this->configuredPriceBlockSelector)] | ||
); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...onal/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Summary/ConfiguredPrice.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,35 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Bundle\Test\Block\Catalog\Product\View\Summary; | ||
|
||
/** | ||
* This class is used to access the price related information from the storefront. | ||
*/ | ||
class ConfiguredPrice extends \Magento\Catalog\Test\Block\AbstractPriceBlock | ||
{ | ||
/** | ||
* Mapping for different type of price. | ||
* | ||
* @var array | ||
*/ | ||
protected $mapTypePrices = [ | ||
'configured_price' => [ | ||
'selector' => '.price', | ||
] | ||
]; | ||
|
||
/** | ||
* This method returns the price represented by the block. | ||
* | ||
* @param string $currency | ||
* @return string|null | ||
*/ | ||
public function getPrice($currency = '$') | ||
{ | ||
return $this->getTypePrice('configured_price', $currency); | ||
} | ||
} |
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
...onal/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Option/Element/Qty.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 © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Bundle\Test\Block\Catalog\Product\View\Type\Option\Element; | ||
|
||
use Magento\Mtf\Client\Element\SimpleElement; | ||
|
||
/** | ||
* Typified element class for qty element. | ||
*/ | ||
class Qty extends SimpleElement | ||
{ | ||
/** | ||
* "Backspace" key code. | ||
*/ | ||
const BACKSPACE = "\xEE\x80\x83"; | ||
|
||
/** | ||
* "RIGHT" key code. | ||
*/ | ||
const RIGHT = "\xEE\x80\x94"; | ||
|
||
/** | ||
* Set the value. | ||
* | ||
* @param string|array $value | ||
* @return void | ||
*/ | ||
public function setValue($value) | ||
{ | ||
$this->keys([self::RIGHT, self::BACKSPACE, $value]); | ||
$this->context->click(); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...unctional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Option/Hidden.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,17 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Bundle\Test\Block\Catalog\Product\View\Type\Option; | ||
|
||
use Magento\Bundle\Test\Block\Catalog\Product\View\Type\Option; | ||
|
||
/** | ||
* Bundle option hidden type. | ||
*/ | ||
class Hidden extends Option | ||
{ | ||
// | ||
} |
Oops, something went wrong.