Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Commit

Permalink
Merge pull request #3 from magento/2.3-develop
Browse files Browse the repository at this point in the history
Updating my repo
  • Loading branch information
arushibansal013 authored Aug 4, 2019
2 parents 3945829 + 41daebf commit 68c17ec
Show file tree
Hide file tree
Showing 176 changed files with 20,528 additions and 796 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Bundle/view/frontend/web/js/float.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
define([
'jquery',
'mage/template',
'jquery/ui',
'jquery-ui-modules/widget',
'Magento_Bundle/js/price-bundle'
], function ($, mageTemplate) {
'use strict';
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Bundle/view/frontend/web/js/slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Captcha/view/frontend/web/js/captcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
63 changes: 63 additions & 0 deletions app/code/Magento/Catalog/Pricing/Price/Collection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types = 1);

namespace Magento\Catalog\Pricing\Price;

use Magento\Framework\App\ObjectManager;
use Magento\Framework\Pricing\SaleableInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Framework\Pricing\Price\Factory;
use Magento\Framework\Pricing\Price\Pool;

/**
* Price models collection class.
*/
class Collection extends \Magento\Framework\Pricing\Price\Collection
{
/**
* @var StoreManagerInterface
*/
private $storeManager;

/**
* @param SaleableInterface $saleableItem
* @param Factory $priceFactory
* @param Pool $pool
* @param float $quantity
* @param StoreManagerInterface|null $storeManager
*/
public function __construct(
SaleableInterface $saleableItem,
Factory $priceFactory,
Pool $pool,
$quantity,
StoreManagerInterface $storeManager = null
) {
parent::__construct($saleableItem, $priceFactory, $pool, $quantity);
$this->storeManager = $storeManager ?? ObjectManager::getInstance()->get(StoreManagerInterface::class);
}

/**
* @inheritdoc
*/
public function get($code)
{
$customerGroupId = $this->saleableItem->getCustomerGroupId() ?? '';
$websiteId = $this->storeManager->getStore($this->saleableItem->getStoreId())->getWebsiteId();
$codeKey = $code . '-' . $customerGroupId . '-' . $websiteId;

if (!isset($this->priceModels[$codeKey])) {
$this->priceModels[$codeKey] = $this->priceFactory->create(
$this->saleableItem,
$this->pool[$code],
$this->quantity
);
}

return $this->priceModels[$codeKey];
}
}
16 changes: 9 additions & 7 deletions app/code/Magento/Catalog/Pricing/Render/FinalPriceBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __construct(
}

/**
* @return string
* @inheritdoc
*/
protected function _toHtml()
{
Expand Down Expand Up @@ -182,25 +182,27 @@ public function showMinimalPrice()
*/
public function getCacheKey()
{
return parent::getCacheKey() . ($this->getData('list_category_page') ? '-list-category-page': '');
return parent::getCacheKey()
. ($this->getData('list_category_page') ? '-list-category-page': '')
. ($this->getSaleableItem()->getCustomerGroupId() ?? '');
}

/**
* {@inheritdoc}
*
* @return array
* @inheritdoc
*/
public function getCacheKeyInfo()
{
$cacheKeys = parent::getCacheKeyInfo();
$cacheKeys['display_minimal_price'] = $this->getDisplayMinimalPrice();
$cacheKeys['is_product_list'] = $this->isProductList();
$cacheKeys['customer_group_id'] = $this->getSaleableItem()->getCustomerGroupId();
return $cacheKeys;
}

/**
* Get flag that price rendering should be done for the list of products
* By default (if flag is not set) is false
* Get flag that price rendering should be done for the list of products.
*
* By default (if flag is not set) is false.
*
* @return bool
*/
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@
</argument>
</arguments>
</virtualType>
<virtualType name="Magento\Catalog\Pricing\Price\Collection" type="Magento\Framework\Pricing\Price\Collection">
<type name="Magento\Catalog\Pricing\Price\Collection">
<arguments>
<argument name="pool" xsi:type="object">Magento\Catalog\Pricing\Price\Pool</argument>
</arguments>
</virtualType>
</type>
<type name="Magento\Framework\Pricing\PriceInfo\Factory">
<arguments>
<argument name="types" xsi:type="array">
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/view/base/web/js/price-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ define([
'Magento_Catalog/js/price-utils',
'underscore',
'mage/template',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($, utils, _, mageTemplate) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define([
'jquery',
'priceUtils',
'priceOptions',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($, utils) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/view/base/web/js/price-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ define([
'mage/template',
'priceUtils',
'priceBox',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($, _, mageTemplate, utils) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define([
'mage/translate',
'underscore',
'Magento_Catalog/js/product/view/product-ids-resolver',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($, $t, _, idsResolver) {
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/view/frontend/web/js/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
if (typeof define === 'function' && define.amd) {
define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], factory);
} else {
factory(jQuery);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/view/frontend/web/js/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
define([
'jquery',
'mage/translate',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($, $t) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/translate'
], function ($) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/view/frontend/web/js/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
if (typeof define === 'function' && define.amd) {
define([
'jquery',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/validation/validation'
], factory);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
define([
'Magento_Ui/js/modal/alert',
'jquery',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/validation'
], function (alert, $) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define([
'jquery',
'mage/template',
'underscore',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/validation'
], function ($, mageTemplate, _) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ define([
'Magento_Ui/js/modal/alert',
'Magento_Ui/js/modal/confirm',
'underscore',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/decorate',
'mage/collapsible',
'mage/cookies'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ define([
'mage/translate',
'priceUtils',
'priceBox',
'jquery/ui',
'jquery-ui-modules/widget',
'jquery/jquery.parsequery'
], function ($, _, mageTemplate, $t, priceUtils) {
'use strict';
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Cookie/view/frontend/web/js/notices.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
define([
'jquery',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/cookies'
], function ($) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/view/frontend/web/js/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
define([
'jquery',
'Magento_Ui/js/modal/confirm',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/translate'
], function ($, confirm) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ define([
'mageUtils',
'mage/translate',
'Magento_Checkout/js/model/postcode-validator',
'jquery/ui',
'jquery-ui-modules/widget',
'validation'
], function ($, __, utils, $t, postCodeValidator) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
define([
'jquery',
'jquery/ui',
'jquery-ui-modules/widget',
'Magento_Catalog/js/price-box'
], function ($) {
'use strict';
Expand Down
Loading

0 comments on commit 68c17ec

Please sign in to comment.