Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.3-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - #16573: Setting deploy mode to production with --skip-compilation flag should� (by @gelanivishal)
 - #16546: Properly hyphenate "third-party" (by @ronak2ram)
 - #16537: Issue in adding the wishlist of "zero price" product (by @gelanivishal)
 - #16520: [Forwardport] fix: change "My Dashboard" to "My Account", fixes #16007 (by @DanielRuf)
 - #16504: [Forwardport] Admin controller product set save refactor (by @AnshuMishra17)
 - #16228: [Forwardport] #16079 translation possibility for moreButtonText (by @Karlasa)
 - #13501: [Improvement] Implement customer group grid on ui component (by @simpleadm)


Fixed GitHub Issues:
 - #16479: Issue in adding the wishlist of "zero price" product.  (reported by @Sathishkumar8731) has been fixed in #16537 by @gelanivishal in 2.3-develop branch
   Related commits:
     1. 4cb997a

 - #16079: Need information about translating issue (Magento Swatches Js) (reported by @mageho) has been fixed in #16228 by @Karlasa in 2.3-develop branch
   Related commits:
     1. abcded5
     2. 988ef89
  • Loading branch information
magento-engcom-team authored Jul 7, 2018
2 parents 6b8f59c + 540a6af commit 0c2fa6f
Show file tree
Hide file tree
Showing 29 changed files with 703 additions and 86 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<backend_model>Magento\Config\Model\Config\Backend\Store</backend_model>
<comment>
<![CDATA[<strong style="color:red">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third party services (e.g. PayPal etc.).]]>
<![CDATA[<strong style="color:red">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).]]>
</comment>
</field>
<field id="redirect_to_base" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Backend/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,9 @@ Web,Web
"Url Options","Url Options"
"Add Store Code to Urls","Add Store Code to Urls"
"
<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third party services (e.g. PayPal etc.).
<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
","
<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third party services (e.g. PayPal etc.).
<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
"
"Auto-redirect to Base URL","Auto-redirect to Base URL"
"Search Engine Optimization","Search Engine Optimization"
Expand Down Expand Up @@ -447,7 +447,7 @@ Tags,Tags
"<h1 class=""page-heading"">404 Error</h1><p>Page not found.</p>","<h1 class=""page-heading"">404 Error</h1><p>Page not found.</p>"
"Community Edition","Community Edition"
"Default Theme","Default Theme"
"If no value is specified, the system default is used. The system default may be modified by third party extensions.","If no value is specified, the system default is used. The system default may be modified by third party extensions."
"If no value is specified, the system default is used. The system default may be modified by third-party extensions.","If no value is specified, the system default is used. The system default may be modified by third-party extensions."
"Applied Theme","Applied Theme"
"Design Rule","Design Rule"
"User Agent Rules","User Agent Rules"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</settings>
<field name="theme_theme_id" sortOrder="10" formElement="select">
<settings>
<notice translate="true">If no value is specified, the system default is used. The system default may be modified by third party extensions.</notice>
<notice translate="true">If no value is specified, the system default is used. The system default may be modified by third-party extensions.</notice>
<dataType>text</dataType>
<label translate="true">Applied Theme</label>
<dataScope>theme_theme_id</dataScope>
Expand Down
49 changes: 38 additions & 11 deletions app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
*/
namespace Magento\Catalog\Controller\Adminhtml\Product\Set;

use Magento\Framework\App\ObjectManager;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Set
{
/**
Expand All @@ -17,22 +22,49 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Set
* @var \Magento\Framework\Controller\Result\JsonFactory
*/
protected $resultJsonFactory;


/*
* @var \Magento\Eav\Model\Entity\Attribute\SetFactory
*/
private $attributeSetFactory;

/*
* @var \Magento\Framework\Filter\FilterManager
*/
private $filterManager;

/*
* @var \Magento\Framework\Json\Helper\Data
*/
private $jsonHelper;

/**
* @param \Magento\Backend\App\Action\Context $context
* @param \Magento\Framework\Registry $coreRegistry
* @param \Magento\Framework\View\LayoutFactory $layoutFactory
* @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
* @param \Magento\Eav\Model\Entity\Attribute\SetFactory $attributeSetFactory
* @param \Magento\Framework\Filter\FilterManager $filterManager
* @param \Magento\Framework\Json\Helper\Data $jsonHelper
*/
public function __construct(
\Magento\Backend\App\Action\Context $context,
\Magento\Framework\Registry $coreRegistry,
\Magento\Framework\View\LayoutFactory $layoutFactory,
\Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
\Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
\Magento\Eav\Model\Entity\Attribute\SetFactory $attributeSetFactory = null,
\Magento\Framework\Filter\FilterManager $filterManager = null,
\Magento\Framework\Json\Helper\Data $jsonHelper = null
) {
parent::__construct($context, $coreRegistry);
$this->layoutFactory = $layoutFactory;
$this->resultJsonFactory = $resultJsonFactory;
$this->attributeSetFactory = $attributeSetFactory ?: ObjectManager::getInstance()
->get(\Magento\Eav\Model\Entity\Attribute\SetFactory::class);
$this->filterManager = $filterManager ?: ObjectManager::getInstance()
->get(\Magento\Framework\Filter\FilterManager::class);
$this->jsonHelper = $jsonHelper ?: ObjectManager::getInstance()
->get(\Magento\Framework\Json\Helper\Data::class);
}

/**
Expand Down Expand Up @@ -65,16 +97,12 @@ public function execute()
$isNewSet = $this->getRequest()->getParam('gotoEdit', false) == '1';

/* @var $model \Magento\Eav\Model\Entity\Attribute\Set */
$model = $this->_objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class)
->setEntityTypeId($entityTypeId);

/** @var $filterManager \Magento\Framework\Filter\FilterManager */
$filterManager = $this->_objectManager->get(\Magento\Framework\Filter\FilterManager::class);
$model = $this->attributeSetFactory->create()->setEntityTypeId($entityTypeId);

try {
if ($isNewSet) {
//filter html tags
$name = $filterManager->stripTags($this->getRequest()->getParam('attribute_set_name'));
$name = $this->filterManager->stripTags($this->getRequest()->getParam('attribute_set_name'));
$model->setAttributeSetName(trim($name));
} else {
if ($attributeSetId) {
Expand All @@ -85,11 +113,10 @@ public function execute()
__('This attribute set no longer exists.')
);
}
$data = $this->_objectManager->get(\Magento\Framework\Json\Helper\Data::class)
->jsonDecode($this->getRequest()->getPost('data'));
$data = $this->jsonHelper->jsonDecode($this->getRequest()->getPost('data'));

//filter html tags
$data['attribute_set_name'] = $filterManager->stripTags($data['attribute_set_name']);
$data['attribute_set_name'] = $this->filterManager->stripTags($data['attribute_set_name']);

$model->organizeData($data);
}
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/Pricing/Price/RegularPrice.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ class RegularPrice extends AbstractPrice implements BasePriceProviderInterface
/**
* Get price value
*
* @return float|bool
* @return float
*/
public function getValue()
{
if ($this->value === null) {
$price = $this->product->getPrice();
$priceInCurrentCurrency = $this->priceCurrency->convertAndRound($price);
$this->value = $priceInCurrentCurrency ? floatval($priceInCurrentCurrency) : false;
$this->value = $priceInCurrentCurrency ? floatval($priceInCurrentCurrency) : 0;
}
return $this->value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
*/
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
/**
* @var string
*/
protected $_idFieldName = 'customer_group_id';

/**
* Resource initialization
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,62 @@
*/
namespace Magento\Customer\Model\ResourceModel\Group\Grid;

class Collection extends \Magento\Customer\Model\ResourceModel\Group\Collection
use Magento\Customer\Model\ResourceModel\Group\Collection as GroupCollection;
use Magento\Framework\Api\Search\SearchResultInterface;
use Magento\Framework\Search\AggregationInterface;

/**
* Collection for displaying grid of customer groups
*/
class Collection extends GroupCollection implements SearchResultInterface
{
/**
* @var AggregationInterface
*/
protected $aggregations;

/**
* @param \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory
* @param \Psr\Log\LoggerInterface $logger
* @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
* @param \Magento\Framework\Event\ManagerInterface $eventManager
* @param string $mainTable
* @param string $eventPrefix
* @param string $eventObject
* @param string $resourceModel
* @param string $model
* @param \Magento\Framework\DB\Adapter\AdapterInterface|string|null $connection
* @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
\Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory,
\Psr\Log\LoggerInterface $logger,
\Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
\Magento\Framework\Event\ManagerInterface $eventManager,
$mainTable,
$eventPrefix,
$eventObject,
$resourceModel,
$model = \Magento\Framework\View\Element\UiComponent\DataProvider\Document::class,
$connection = null,
\Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
) {
parent::__construct(
$entityFactory,
$logger,
$fetchStrategy,
$eventManager,
$connection,
$resource
);
$this->_eventPrefix = $eventPrefix;
$this->_eventObject = $eventObject;
$this->_init($model, $resourceModel);
$this->setMainTable($mainTable);
}

/**
* Resource initialization
* @return $this
Expand All @@ -19,4 +73,78 @@ protected function _initSelect()
$this->addTaxClass();
return $this;
}

/**
* @return AggregationInterface
*/
public function getAggregations()
{
return $this->aggregations;
}

/**
* @param AggregationInterface $aggregations
* @return $this
*/
public function setAggregations($aggregations)
{
$this->aggregations = $aggregations;
return $this;
}

/**
* Get search criteria.
*
* @return \Magento\Framework\Api\SearchCriteriaInterface|null
*/
public function getSearchCriteria()
{
return null;
}

/**
* Set search criteria.
*
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
* @return $this
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function setSearchCriteria(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria = null)
{
return $this;
}

/**
* Get total count.
*
* @return int
*/
public function getTotalCount()
{
return $this->getSize();
}

/**
* Set total count.
*
* @param int $totalCount
* @return $this
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function setTotalCount($totalCount)
{
return $this;
}

/**
* Set items list.
*
* @param \Magento\Framework\Api\ExtensibleDataInterface[] $items
* @return $this
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function setItems(array $items = null)
{
return $this;
}
}
Loading

0 comments on commit 0c2fa6f

Please sign in to comment.