Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.3-develop Minor Fixes
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - #21197: [Ui] Fixing the changing state of dropdown's icon (by @eduard13)
 - #21227: remove-duplicated-media (by @priti2jcommerce)
 - #20839: Checkout shipping tooltip 20838 (by @abrarpathan19)
 - #19566: Minimum Qty Allowed in Shopping Cart not working on related product (by @mageprince)
 - #20237: Backend: User Role Checkbox alignement. (by @suryakant-krish)
 - #19679: #19575 magentoDataFixture should allow to use Module Prefix - Integrations Test  (by @larsroettig)
 - #19487: Fix DHL Quotes for Domestic Shipments when Content Type is set to Non-Document (by @gwharton)
 - #19191:  Customer related values are NULL for guests converted to customers after checkout. #19166 (by @Nazar65)


Fixed GitHub Issues:
 - #21196: [UI] The dropdown state doesn't change if the dropdown is expanded or not (reported by @eduard13) has been fixed in #21197 by @eduard13 in 2.3-develop branch
   Related commits:
     1. 90f6ad5

 - #20838: Luma theme shipping tool tip icon cut from leftside (reported by @abrarpathan19) has been fixed in #20839 by @abrarpathan19 in 2.3-develop branch
   Related commits:
     1. b76711c

 - magento/community-features#113: magentoDataFixture should allow to use Module Prefix - Integrations Test  (reported by @larsroettig) has been fixed in #19679 by @larsroettig in 2.3-develop branch
   Related commits:
     1. 69ca6d7
     2. a055fa1
     3. 1bd5fff

 - #19485: DHL Shipping Quotes fail for Domestic Shipments when Content Mode is "Non Documents" (reported by @gwharton) has been fixed in #19487 by @gwharton in 2.3-develop branch
   Related commits:
     1. 77a5cd1
     2. ff9282d
     3. d9ac0d6

 - #19166: Customer related values are NULL for guests converted to customers after checkout. (reported by @qsolutions-pl) has been fixed in #19191 by @Nazar65 in 2.3-develop branch
   Related commits:
     1. ccba420
     2. f8a6d05
     3. 7607c82
     4. 560e1d7
     5. 125de74
     6. 5fb9c52
     7. e20c7ef
     8. 7d22ae8
  • Loading branch information
magento-engcom-team authored Feb 18, 2019
2 parents 95dc3f5 + 59d725c commit d653583
Show file tree
Hide file tree
Showing 18 changed files with 362 additions and 119 deletions.
39 changes: 27 additions & 12 deletions app/code/Magento/Checkout/Model/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Shopping cart model
*
* @api
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @deprecated 100.1.0 Use \Magento\Quote\Model\Quote instead
* @see \Magento\Quote\Api\Data\CartInterface
Expand Down Expand Up @@ -365,20 +366,10 @@ protected function _getProductRequest($requestInfo)
public function addProduct($productInfo, $requestInfo = null)
{
$product = $this->_getProduct($productInfo);
$request = $this->_getProductRequest($requestInfo);
$productId = $product->getId();

if ($productId) {
$stockItem = $this->stockRegistry->getStockItem($productId, $product->getStore()->getWebsiteId());
$minimumQty = $stockItem->getMinSaleQty();
//If product quantity is not specified in request and there is set minimal qty for it
if ($minimumQty
&& $minimumQty > 0
&& !$request->getQty()
) {
$request->setQty($minimumQty);
}

$request = $this->getQtyRequest($product, $requestInfo);
try {
$this->_eventManager->dispatch(
'checkout_cart_product_add_before',
Expand Down Expand Up @@ -438,8 +429,9 @@ public function addProductsByIds($productIds)
}
$product = $this->_getProduct($productId);
if ($product->getId() && $product->isVisibleInCatalog()) {
$request = $this->getQtyRequest($product);
try {
$this->getQuote()->addProduct($product);
$this->getQuote()->addProduct($product, $request);
} catch (\Exception $e) {
$allAdded = false;
}
Expand Down Expand Up @@ -762,4 +754,27 @@ private function getRequestInfoFilter()
}
return $this->requestInfoFilter;
}

/**
* Get request quantity
*
* @param Product $product
* @param \Magento\Framework\DataObject|int|array $request
* @return int|DataObject
*/
private function getQtyRequest($product, $request = 0)
{
$request = $this->_getProductRequest($request);
$stockItem = $this->stockRegistry->getStockItem($product->getId(), $product->getStore()->getWebsiteId());
$minimumQty = $stockItem->getMinSaleQty();
//If product quantity is not specified in request and there is set minimal qty for it
if ($minimumQty
&& $minimumQty > 0
&& !$request->getQty()
) {
$request->setQty($minimumQty);
}

return $request;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappearOnSearch"/>
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/>
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Pending" stepKey="seeAdminOrderStatus"/>
<see selector="{{AdminOrderDetailsInformationSection.accountInformation}}" userInput="Guest" stepKey="seeAdminOrderGuest"/>
<see selector="{{AdminOrderDetailsInformationSection.accountInformation}}" userInput="{{CustomerEntityOne.fullname}}" stepKey="seeAdminOrderGuest"/>
<see selector="{{AdminOrderDetailsInformationSection.accountInformation}}" userInput="{{CustomerEntityOne.email}}" stepKey="seeAdminOrderEmail"/>
<see selector="{{AdminOrderDetailsInformationSection.billingAddress}}" userInput="{{CustomerAddressSimple.street[0]}}" stepKey="seeAdminOrderBillingAddress"/>
<see selector="{{AdminOrderDetailsInformationSection.shippingAddress}}" userInput="{{CustomerAddressSimple.street[0]}}" stepKey="seeAdminOrderShippingAddress"/>
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<data key="firstname">John</data>
<data key="lastname">Doe</data>
<data key="middlename">S</data>
<data key="fullname">John Doe</data>
<data key="password">pwdTest123!</data>
<data key="prefix">Mr</data>
<data key="suffix">Sr</data>
Expand Down
4 changes: 1 addition & 3 deletions app/code/Magento/Dhl/Model/Carrier.php
Original file line number Diff line number Diff line change
Expand Up @@ -1964,9 +1964,7 @@ protected function isDutiable($origCountryId, $destCountryId) : bool
{
$this->_checkDomesticStatus($origCountryId, $destCountryId);

return
self::DHL_CONTENT_TYPE_NON_DOC == $this->getConfigData('content_type')
|| !$this->_isDomestic;
return !$this->_isDomestic;
}

/**
Expand Down
Loading

0 comments on commit d653583

Please sign in to comment.