-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Search by partial zipcode is handle by map/geocoder provider - openst…
…reetmap and google map does not have same result on same search - so add config on search placeholder to be able to correctly advice customer during search
- Loading branch information
1 parent
9816532
commit b1b3f98
Showing
7 changed files
with
47 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Smile\RetailerOffer\Helper; | ||
|
||
use Magento\Framework\App\Helper\AbstractHelper; | ||
use Magento\Store\Model\ScopeInterface; | ||
|
||
class Config extends AbstractHelper | ||
{ | ||
public const SEARCH_PLACEHOLDER_XML_PATH = 'smile_retailersuite_retailer_base_settings/search/placeholder'; | ||
|
||
/** | ||
* Get config by config path. | ||
*/ | ||
public function getConfigByPath(string $path, string $scope = ScopeInterface::SCOPE_STORE): mixed | ||
{ | ||
return $this->scopeConfig->getValue($path, $scope); | ||
} | ||
|
||
/** | ||
* Get placeholder for search input of store_locator, default: City, Zipcode, Address, ... | ||
*/ | ||
public function getSearchPlaceholder(): string | ||
{ | ||
return (string) $this->getConfigByPath(self::SEARCH_PLACEHOLDER_XML_PATH) ?: 'City, Zipcode, Address ...'; | ||
} | ||
} |
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