prestashop/module-lib-faq
Composer 安装命令:
composer require prestashop/module-lib-faq
包简介
Library allowing modules to load FAQ from PrestaShop servers
README 文档
README
This library retrieves the FAQ (Frequently Asked Questions) content from PrestaShop APIs.
It is most likely to be used in PrestaShop modules, but can be integrated in any PHP project.
This library is compatible with PHP 5.6 and above.
Installation
composer require prestashop/module-lib-faq
Usage
-
Common case
The simplest way to use this library is:
use PrestaShop\ModuleLibFaq\Faq; // [...] $faq = new Faq('your module key', _PS_VERSION, 'the current iso code'); $faqContent = $faq->getFaq();
-
With additional code to run in case of error
use PrestaShop\ModuleLibFaq\Faq; // [...] $faq = new Faq('your module key', _PS_VERSION, 'the current iso code'); $faq->setErrorCallable(function(\Exception $e) { /* send to logger */ }); $faqContent = $faq->getFaq();
The content returned is an array of categories, each of them having an array of questions/answers.
Example of json that will be json_decoded by the library:
{
"id_faq": 117,
"module_key": "82bc76354cfef947e06f1cc78f5efe2e",
"id_product": 46347,
"categories": [
{
"id_faq_category": 142,
"position": 1,
"id_faq": 117,
"title": "Questions about payments",
"blocks": [
{
"id_faq_block": 522,
"question": "Will my customers be able to see the PrestaShop Checkout payment method?",
"answer": "No, PrestaShop Checkout is the name of the service and the module. Your customers will only see the payment methods they are already familiar with including: credit card, PayPal, and/or another major payment method used in their country.",
"version_min": "",
"version_max": ""
},
]
},
{
"id_faq_category": 141,
"position": 2,
"id_faq": 117,
"title": "Questions about refund feature",
"blocks": [
{
"id_faq_block": 521,
"question": "I am trying to issue a refund for a PrestaShop order, but an error message says, “Capture could not be refunded due to insufficient funds.” However, I know I have the funds in my PayPal account.",
"answer": "For refunds for an order paid for using a different currency than the ones available on your PayPal account, you have two options:\n\n- Adding all the currencies covered in your store to your PayPal account to avoid rejections of cross-currency transactions and any refund issues.\n\nTo do so, go to paypal.com > Login > Settings > My Money > Currencies management > Add a currency\n\n- Contacting PayPal and asking them to activate the cross-currency refund option. (Via the \"\"Contact us\"\" tab on paypal.com).",
"version_min": "",
"version_max": ""
}
]
}
]
}
prestashop/module-lib-faq 适用场景与选型建议
prestashop/module-lib-faq 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 35.17k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 10 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 prestashop/module-lib-faq 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 prestashop/module-lib-faq 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 35.17k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: AFL-3.0
- 更新时间: 2020-10-15