anee/shopfinder
Composer 安装命令:
composer require anee/shopfinder
包简介
Magento2 Shopfiner module to add shop list and search shop near to customer.
README 文档
README
| title | README For Shopfinder Module |
|---|
Anee_Shopfinder
General
The purpose of this module is to manage all store shops and find the shop by name and identifier near to customer.
Controller Actions
\Anee\Shopfinder\Controller\Adminhtml\Shopfinder\Index
This controller is used to render the grid of shops.
\Anee\Shopfinder\Controller\Adminhtml\Shopfinder\Save
This controller is used to save the data after getting submitted from shop form.
\Anee\Shopfinder\Controller\Adminhtml\Shopfinder\Delete
This controller is used to delete single item of shop from grid row.
\Anee\Shopfinder\Controller\Adminhtml\Shopfinder\MassDelete
This controller is used to delete multiple items of shop from grid action.
\Anee\Shopfinder\Controller\Adminhtml\Shopfinder\Edit
This controller is used to show form for updating the data of shop.
\Anee\Shopfinder\Controller\Adminhtml\Shopfinder\NewAction
This controller is used to show form for adding the data of shop.
\Anee\Shopfinder\Controller\Adminhtml\Shopfinder\Upload
This controller is used to upload the image in directory of images from add/update form.
Services
\Anee\Shopfinder\Service\ImageUploaderService
This service is responsible to save the image in tmp images directory and then move to the original images directory.
\Anee\Shopfinder\Service\UpdateShopfinderShopDataService
This service is responsible to update the shop data used in graphql mutation resolver class.
Validators
Anee\Shopfinder\Validator\IsUniqueShopfinderIdentifierValidator
This validator will validate that same identifier is not exist. If same identifier is exist for any other shop then
it will throw exception else return true.
GraphQl APIs
GetShopByIdentifier - \Anee\Shopfinder\GraphQl\Resolver\ShopfinderResolver
This GraphQl Api is used to get shop data by input parameter identifier. It will validate first that identifier is
exist in request if not exist then throw the exception. If shop not exist with identifier then it will also throw
the exception but if exist then return data in array.
GetShopByIdentifier Request
{ GetShopByIdentifier(identifier: "string") { country createdAt id identifier image latitude longitude name updatedAt } }
GetShopfinderShopList - \Anee\Shopfinder\GraphQl\Resolver\GetShopfinderShopListResolver
This GraphQl Api is used to get all shops list. If data is not exist then it will throw exception with message.
If shop data exist then it will return the list of shop.
GetShopfinderShopList Request
{ GetShopfinderShopList { country createdAt id identifier image latitude longitude name updatedAt } }
DeleteShopByIdentifier - \Anee\Shopfinder\GraphQl\Resolver\DeleteShopfinderResolver
This GraphQl Api is used to show message when someone tried to delete shop by identifier. It will only show nice
message that shop can not be deleted and also shop will not be deleted.
DeleteShopByIdentifier Request
{ DeleteShopByIdentifier(identifier: "string") { identifier message status } }
UpdateShopfinderShop - \Anee\Shopfinder\GraphQl\Resolver\UpdateShopfinderShopResolver
This GraphQl Api is used to update the shop data. It will take all data and update the shop.
UpdateShopfinderShop Request
mutation { UpdateShopfinderShop( id: 1 name: "string" identifier: "string" country: "string" image: "string" longitude: "string" latitude: "string" ) { country createdAt id identifier image latitude longitude name updatedAt } }
Module Installation
composer require anee/shopfinder
If composer downloaded file successfully then run following command on magento root directory:
php bin/magento s:up && php bin/magento setup:di:compile && php bin/magento s:s:d -f
If composer not able to download the module from source then try following:
composer require "anee/shopfinder ~1.0.0"
If still facing any issue then download code from git:
https://github.com/aneel2023/shopfinder
Put above downloaded code in app/code/Anee/Shopfinder directory and execute following command:
php bin/magento s:up && php bin/magento setup:di:compile && php bin/magento s:s:d -f
Run All PHP Unit Tests
-
Copy
dev/tests/unit/phpunit.xml.disttodev/tests/unit/phpunit.xml -
Comment out line 60 ->
<string>allure/allure.config.php</string> -
Run following command from project root directory:
vendor/bin/phpunit -c dev/tests/unit/phpunit.xml vendor/anee/shopfinder/Test/Unit/
Run All PHP Integration Tests
-
Rename
dev/tests/integration/etc/install-config-mysql.php.disttodev/tests/integration/etc/install-config-mysql.php -
Update
db-host,db-user,db-passwordanddb-name(Create new db for integration tests) -
After creating new db, make sure to run
setup:upgrade and setup:di:coompile commands -
Copy
dev/tests/integration/phpunit.xml.disttodev/integration/unit/phpunit.xml -
Execute
cd dev/tests/integration -
Run following command from above directory:
../../../vendor/bin/phpunit ../../../vendor/anee/shopfinder/Test/Integration/
anee/shopfinder 适用场景与选型建议
anee/shopfinder 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 35 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 07 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 anee/shopfinder 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 anee/shopfinder 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 35
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2023-07-31