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:
 - magento#20182: Use correct base path to check if setup folder exists (by @JeroenVanLeusden)
 - magento#22220: Remove an unused variable from order_list fixture in the integration test suite. (by @evktalo)
 - magento#22073: Bug fix for magento#21753 (2.3-develop) (by @crankycyclops)
 - magento#21501: Same product quantity not increment when added with guest user. magento#21375 (by @Jitheesh)
 - magento#20832: fixes-for-customer-name-twice-desktop (by @priti2jcommerce)
 - magento#21788: magento#21786 Fixed asynchronous email sending for the sales entities which were created with disabled email sending (by @serhiyzhovnir)
 - magento#19530: Fixed fatal error if upgrading from Magento v2.0.0 to v2.3 and non system attributes missing (by @suneet64)


Fixed GitHub Issues:
 - magento#7623: Web Setup Wizard not visible in backend (V.2.1.2) ONGOING (reported by @dharake) has been fixed in magento#20182 by @JeroenVanLeusden in 2.3-develop branch
   Related commits:
     1. 8966f5f
     2. 204675e

 - magento#11892: Web Setup Wizard not visible in backend magento 2.1.9 (reported by @amithlalalj) has been fixed in magento#20182 by @JeroenVanLeusden in 2.3-develop branch
   Related commits:
     1. 8966f5f
     2. 204675e

 - magento#21753: Order Item Status to Enable Downloads is set to "Pending," but no download links are presented in "My Downloads" when logged in (fix provided) (reported by @crankycyclops) has been fixed in magento#22073 by @crankycyclops in 2.3-develop branch
   Related commits:
     1. 6076fdc
     2. d32da36
     3. 2c16697
     4. 5410e07
     5. d189b69
     6. 460c4f3

 - magento#21375: Same product quantity not increment when added with guest user. (reported by @krishprakash) has been fixed in magento#21501 by @Jitheesh in 2.3-develop branch
   Related commits:
     1. 30dbc79

 - magento#20830: On Header customer name appearing twice after login (reported by @dipti2jcommerce) has been fixed in magento#20832 by @priti2jcommerce in 2.3-develop branch
   Related commits:
     1. 7ee12b0
     2. 921f7b9
     3. 7314d76
     4. a2b2aa0
     5. 6c14bd8
     6. d9568f4

 - magento#21786: Asynchronous email sending for the sales entities which were created with disabled email sending (reported by @serhiyzhovnir) has been fixed in magento#21788 by @serhiyzhovnir in 2.3-develop branch
   Related commits:
     1. 8ed9266
     2. 3ebdbff
     3. 17cd172
     4. f36dbc9
     5. 1a297e8
  • Loading branch information
magento-engcom-team authored Apr 16, 2019
2 parents c224526 + 692fe04 commit 3290565
Show file tree
Hide file tree
Showing 22 changed files with 127 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

namespace Magento\ConfigurableProduct\Setup\Patch\Data;

use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\App\ResourceConnection;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Framework\Setup\Patch\PatchVersionInterface;
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;

/**
* Class InstallInitialConfigurableAttributes
*
* @package Magento\ConfigurableProduct\Setup\Patch
*/
class InstallInitialConfigurableAttributes implements DataPatchInterface, PatchVersionInterface
Expand All @@ -24,6 +24,7 @@ class InstallInitialConfigurableAttributes implements DataPatchInterface, PatchV
* @var ModuleDataSetupInterface
*/
private $moduleDataSetup;

/**
* @var EavSetupFactory
*/
Expand All @@ -43,7 +44,7 @@ public function __construct(
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function apply()
{
Expand All @@ -64,40 +65,43 @@ public function apply()
'color'
];
foreach ($attributes as $attributeCode) {
$relatedProductTypes = explode(
',',
$eavSetup->getAttribute(\Magento\Catalog\Model\Product::ENTITY, $attributeCode, 'apply_to')
);
if (!in_array(Configurable::TYPE_CODE, $relatedProductTypes)) {
$relatedProductTypes[] = Configurable::TYPE_CODE;
$eavSetup->updateAttribute(
\Magento\Catalog\Model\Product::ENTITY,
$attributeCode,
'apply_to',
implode(',', $relatedProductTypes)
$attribute = $eavSetup->getAttribute(\Magento\Catalog\Model\Product::ENTITY, $attributeCode, 'apply_to');
if ($attribute) {
$relatedProductTypes = explode(
',',
$attribute
);
if (!in_array(Configurable::TYPE_CODE, $relatedProductTypes)) {
$relatedProductTypes[] = Configurable::TYPE_CODE;
$eavSetup->updateAttribute(
\Magento\Catalog\Model\Product::ENTITY,
$attributeCode,
'apply_to',
implode(',', $relatedProductTypes)
);
}
}
}
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public static function getDependencies()
{
return [];
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public static function getVersion()
{
return '2.0.0';
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getAliases()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="CustomerLogoutStorefrontByMenuItemsActionGroup">
<conditionalClick selector="{{StorefrontPanelHeaderSection.customerWelcome}}"
dependentSelector="{{StorefrontPanelHeaderSection.customerWelcomeMenu}}"
<conditionalClick selector="{{StorefrontPanelHeaderSection.customerWelcomeMenu}}"
dependentSelector="{{StorefrontPanelHeaderSection.customerLogoutLink}}"
visible="false"
stepKey="clickHeaderCustomerMenuButton" />
<click selector="{{StorefrontPanelHeaderSection.customerLogoutLink}}" stepKey="clickSignOutButton" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<element name="welcomeMessage" type="text" selector="header>.panel .greet.welcome" />
<element name="createAnAccountLink" type="select" selector="//div[@class='panel wrapper']//li/a[contains(.,'Create an Account')]" timeout="30"/>
<element name="notYouLink" type="button" selector=".greet.welcome span a"/>
<element name="customerWelcome" type="text" selector=".panel.header .customer-welcome"/>
<element name="customerWelcomeMenu" type="text" selector=".panel.header .customer-welcome .customer-menu"/>
<element name="customerWelcome" type="text" selector=".panel.header .greet.welcome"/>
<element name="customerWelcomeMenu" type="text" selector=".panel.header .customer-welcome .customer-name"/>
<element name="customerLoginLink" type="button" selector=".panel.header .header.links .authorization-link a" timeout="30"/>
<element name="customerLogoutLink" type="text" selector=".panel.header .customer-welcome .customer-menu .authorization-link a" timeout="30"/>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
data-toggle="dropdown"
data-trigger-keypress-button="true"
data-bind="scope: 'customer'">
<span data-bind="text: customer().fullname"></span>
<button type="button"
class="action switch"
tabindex="-1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
use Magento\Store\Model\ScopeInterface;

/**
* Saves data from order to purchased links.
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class SaveDownloadableOrderItemObserver implements ObserverInterface
Expand Down Expand Up @@ -92,9 +94,15 @@ public function execute(\Magento\Framework\Event\Observer $observer)
if ($purchasedLink->getId()) {
return $this;
}
$storeId = $orderItem->getOrder()->getStoreId();
$orderStatusToEnableItem = $this->_scopeConfig->getValue(
\Magento\Downloadable\Model\Link\Purchased\Item::XML_PATH_ORDER_ITEM_STATUS,
ScopeInterface::SCOPE_STORE,
$storeId
);
if (!$product) {
$product = $this->_createProductModel()->setStoreId(
$orderItem->getOrder()->getStoreId()
$storeId
)->load(
$orderItem->getProductId()
);
Expand Down Expand Up @@ -150,6 +158,8 @@ public function execute(\Magento\Framework\Event\Observer $observer)
)->setNumberOfDownloadsBought(
$numberOfDownloads
)->setStatus(
\Magento\Sales\Model\Order\Item::STATUS_PENDING == $orderStatusToEnableItem ?
\Magento\Downloadable\Model\Link\Purchased\Item::LINK_STATUS_AVAILABLE :
\Magento\Downloadable\Model\Link\Purchased\Item::LINK_STATUS_PENDING
)->setCreatedAt(
$orderItem->getCreatedAt()
Expand All @@ -165,6 +175,8 @@ public function execute(\Magento\Framework\Event\Observer $observer)
}

/**
* Create purchased model.
*
* @return \Magento\Downloadable\Model\Link\Purchased
*/
protected function _createPurchasedModel()
Expand All @@ -173,6 +185,8 @@ protected function _createPurchasedModel()
}

/**
* Create product model.
*
* @return \Magento\Catalog\Model\Product
*/
protected function _createProductModel()
Expand All @@ -181,6 +195,8 @@ protected function _createProductModel()
}

/**
* Create purchased item model.
*
* @return \Magento\Downloadable\Model\Link\Purchased\Item
*/
protected function _createPurchasedItemModel()
Expand All @@ -189,6 +205,8 @@ protected function _createPurchasedItemModel()
}

/**
* Create items collection.
*
* @return \Magento\Downloadable\Model\ResourceModel\Link\Purchased\Item\Collection
*/
protected function _createItemsCollection()
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Quote/Model/Quote/Item/Compare.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function getOptionValues($value)
if (is_string($value) && $this->jsonValidator->isValid($value)) {
$value = $this->serializer->unserialize($value);
if (is_array($value)) {
unset($value['qty'], $value['uenc']);
unset($value['qty'], $value['uenc'], $value['related_product'], $value['item']);
$value = array_filter($value, function ($optionValue) {
return !empty($optionValue);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,15 @@ public function __construct(
* @param bool $forceSyncMode
*
* @return bool
* @throws \Exception
*/
public function send(
\Magento\Sales\Api\Data\OrderInterface $order,
\Magento\Sales\Api\Data\CreditmemoInterface $creditmemo,
\Magento\Sales\Api\Data\CreditmemoCommentCreationInterface $comment = null,
$forceSyncMode = false
) {
$creditmemo->setSendEmail(true);
$creditmemo->setSendEmail($this->identityContainer->isEnabled());

if (!$this->globalConfig->getValue('sales_email/general/async_sending') || $forceSyncMode) {
$transport = [
Expand Down Expand Up @@ -145,6 +146,7 @@ public function send(
* @param \Magento\Sales\Api\Data\OrderInterface $order
*
* @return string
* @throws \Exception
*/
private function getPaymentHtml(\Magento\Sales\Api\Data\OrderInterface $order)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ class CreditmemoSender extends Sender
* @param CreditmemoIdentity $identityContainer
* @param Order\Email\SenderBuilderFactory $senderBuilderFactory
* @param \Psr\Log\LoggerInterface $logger
* @param Renderer $addressRenderer
* @param PaymentHelper $paymentHelper
* @param CreditmemoResource $creditmemoResource
* @param \Magento\Framework\App\Config\ScopeConfigInterface $globalConfig
* @param Renderer $addressRenderer
* @param ManagerInterface $eventManager
*/
public function __construct(
Expand Down Expand Up @@ -96,10 +96,11 @@ public function __construct(
* @param Creditmemo $creditmemo
* @param bool $forceSyncMode
* @return bool
* @throws \Exception
*/
public function send(Creditmemo $creditmemo, $forceSyncMode = false)
{
$creditmemo->setSendEmail(true);
$creditmemo->setSendEmail($this->identityContainer->isEnabled());

if (!$this->globalConfig->getValue('sales_email/general/async_sending') || $forceSyncMode) {
$order = $creditmemo->getOrder();
Expand Down Expand Up @@ -146,6 +147,7 @@ public function send(Creditmemo $creditmemo, $forceSyncMode = false)
*
* @param Order $order
* @return string
* @throws \Exception
*/
protected function getPaymentHtml(Order $order)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ class InvoiceSender extends Sender
* @param InvoiceIdentity $identityContainer
* @param Order\Email\SenderBuilderFactory $senderBuilderFactory
* @param \Psr\Log\LoggerInterface $logger
* @param Renderer $addressRenderer
* @param PaymentHelper $paymentHelper
* @param InvoiceResource $invoiceResource
* @param \Magento\Framework\App\Config\ScopeConfigInterface $globalConfig
* @param Renderer $addressRenderer
* @param ManagerInterface $eventManager
*/
public function __construct(
Expand Down Expand Up @@ -96,10 +96,11 @@ public function __construct(
* @param Invoice $invoice
* @param bool $forceSyncMode
* @return bool
* @throws \Exception
*/
public function send(Invoice $invoice, $forceSyncMode = false)
{
$invoice->setSendEmail(true);
$invoice->setSendEmail($this->identityContainer->isEnabled());

if (!$this->globalConfig->getValue('sales_email/general/async_sending') || $forceSyncMode) {
$order = $invoice->getOrder();
Expand Down Expand Up @@ -146,6 +147,7 @@ public function send(Invoice $invoice, $forceSyncMode = false)
*
* @param Order $order
* @return string
* @throws \Exception
*/
protected function getPaymentHtml(Order $order)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ class ShipmentSender extends Sender
* @param ShipmentIdentity $identityContainer
* @param Order\Email\SenderBuilderFactory $senderBuilderFactory
* @param \Psr\Log\LoggerInterface $logger
* @param Renderer $addressRenderer
* @param PaymentHelper $paymentHelper
* @param ShipmentResource $shipmentResource
* @param \Magento\Framework\App\Config\ScopeConfigInterface $globalConfig
* @param Renderer $addressRenderer
* @param ManagerInterface $eventManager
*/
public function __construct(
Expand Down Expand Up @@ -96,10 +96,11 @@ public function __construct(
* @param Shipment $shipment
* @param bool $forceSyncMode
* @return bool
* @throws \Exception
*/
public function send(Shipment $shipment, $forceSyncMode = false)
{
$shipment->setSendEmail(true);
$shipment->setSendEmail($this->identityContainer->isEnabled());

if (!$this->globalConfig->getValue('sales_email/general/async_sending') || $forceSyncMode) {
$order = $shipment->getOrder();
Expand Down Expand Up @@ -146,6 +147,7 @@ public function send(Shipment $shipment, $forceSyncMode = false)
*
* @param Order $order
* @return string
* @throws \Exception
*/
protected function getPaymentHtml(Order $order)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,15 @@ public function __construct(
* @param bool $forceSyncMode
*
* @return bool
* @throws \Exception
*/
public function send(
\Magento\Sales\Api\Data\OrderInterface $order,
\Magento\Sales\Api\Data\InvoiceInterface $invoice,
\Magento\Sales\Api\Data\InvoiceCommentCreationInterface $comment = null,
$forceSyncMode = false
) {
$invoice->setSendEmail(true);
$invoice->setSendEmail($this->identityContainer->isEnabled());

if (!$this->globalConfig->getValue('sales_email/general/async_sending') || $forceSyncMode) {
$transport = [
Expand Down Expand Up @@ -145,6 +146,7 @@ public function send(
* @param \Magento\Sales\Api\Data\OrderInterface $order
*
* @return string
* @throws \Exception
*/
private function getPaymentHtml(\Magento\Sales\Api\Data\OrderInterface $order)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,15 @@ public function __construct(
* @param bool $forceSyncMode
*
* @return bool
* @throws \Exception
*/
public function send(
\Magento\Sales\Api\Data\OrderInterface $order,
\Magento\Sales\Api\Data\ShipmentInterface $shipment,
\Magento\Sales\Api\Data\ShipmentCommentCreationInterface $comment = null,
$forceSyncMode = false
) {
$shipment->setSendEmail(true);
$shipment->setSendEmail($this->identityContainer->isEnabled());

if (!$this->globalConfig->getValue('sales_email/general/async_sending') || $forceSyncMode) {
$transport = [
Expand Down Expand Up @@ -145,6 +146,7 @@ public function send(
* @param \Magento\Sales\Api\Data\OrderInterface $order
*
* @return string
* @throws \Exception
*/
private function getPaymentHtml(\Magento\Sales\Api\Data\OrderInterface $order)
{
Expand Down
Loading

0 comments on commit 3290565

Please sign in to comment.