-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "Ready for Pickup" button on the Order page in Admin Panel which …
…notifies Customer that Order could be picked up #2034. Do not show button is order is not placed using storepickup or it can not be shipped
- Loading branch information
Showing
2 changed files
with
31 additions
and
10 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
22 changes: 22 additions & 0 deletions
22
app/code/Magento/InventoryInStorePickupAdminUi/Model/IsDisplayReadyForPickupButton.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,22 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\InventoryInStorePickupAdminUi\Model; | ||
|
||
class IsDisplayReadyForPickupButton | ||
{ | ||
/** | ||
* @param \Magento\Sales\Model\Order $order | ||
* | ||
* @return bool | ||
*/ | ||
public function execute(\Magento\Sales\Model\Order $order):bool | ||
{ | ||
return $order->getExtensionAttributes()->getPickupLocationCode() | ||
&& $order->canShip(); | ||
} | ||
} |