-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Refactor - same search design everywhere - Dont show store delivery shipping method if no markers found
- Loading branch information
1 parent
148ee06
commit 6f0e065
Showing
8 changed files
with
141 additions
and
75 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
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
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,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Smile\StoreDelivery\Plugin\CustomerData; | ||
|
||
use Magento\Framework\DataObject; | ||
use Smile\Retailer\Api\Data\RetailerInterface; | ||
use Smile\StoreLocator\CustomerData\CurrentStore; | ||
|
||
class CurrentStorePlugin | ||
{ | ||
/** | ||
* Add current store allow_store_delivery value to customerData | ||
*/ | ||
public function afterGetSectionData( | ||
CurrentStore $subject, | ||
array $result | ||
): array { | ||
$result['allow_store_delivery'] = 0; | ||
/** @var DataObject|RetailerInterface|null $retailer */ | ||
$retailer = $subject->getRetailer(); | ||
|
||
if ($retailer) { | ||
$result['allow_store_delivery'] = (int) $retailer->getData('allow_store_delivery'); | ||
} | ||
|
||
return $result; | ||
} | ||
} |
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
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
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
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
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