shopigo/magento2-extension-ajax-listing
Composer 安装命令:
composer require shopigo/magento2-extension-ajax-listing
包简介
Magento 2 AJAX Listing extension by Shopigo
README 文档
README
Magento 2 AJAX Listing extension by Shopigo
This extension allows to get the content of any product listing (category page or search results) in JSON format.
Example:
https://[mymagentostore]/women.html?p=2&ajax=1
{
"success": true,
"current_page_url": "https:\/\/[mymagentostore]\/women.html?p=2",
"previous_page_url": "https:\/\/[mymagentostore]\/women.html",
"next_page_url": "https:\/\/[mymagentostore]\/women.html?p=3",
"html": {
"content": "[html_content]",
"sidebar_main": "[html_content]",
}
}
Requirements
Magento Open Source Edition 2.2 or 2.3
Installation
Method 1 - Installing via composer
- Switch to your Magento project root
- Run
composer require shopigo/magento2-extension-ajax-listing
Method 2 - Installing using archive
- Download ZIP Archive
- Switch to your Magento project root
- Create folder
app/code/Shopigo/CatalogAjaxListing - Extract zip into path
Enable extension
- Switch to your Magento project root
- Run the following commands to enable the module and clear static contents generated by Magento:
php bin/magento module:enable Shopigo_CatalogAjaxListing
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
How to use it
- On any product listing (category page or search results), add a parameter "ajax=1" to the URL
Response
Success
| Field | Format | Description | Example |
|---|---|---|---|
| success | boolean | Response state. Set to true in case of success. |
true |
| current_page_url | string | Current page URL | https://[mymagentostore]/women.html?p=3 |
| previous_page_url | string | Previous page URL (if existing) | https://[mymagentostore]/women.html?p=2 |
| next_page_url | string | Next page URL (if existing) | https://[mymagentostore]/women.html?p=4 |
| html[content] | string | HTML content of the products list | - |
| html[sidebar_main] | string | HTML content of the main sidebar | - |
Error
| Field | Format | Description | Example |
|---|---|---|---|
| success | boolean | Response state. Set to false in case of error. |
false |
| error_message | string | Error message | Unable to load block content. |
Support
If you have any issues, open a bug report in GitHub's issue tracker.
Change logs
Version 1.0.1 (2019-02-07)
- Fix composer.json for Magento 2.3
Version 1.0.0 (2018-10-09)
- First version
License
The code is licensed under Open Software License ("OSL") v. 3.0.
Enjoy!
shopigo/magento2-extension-ajax-listing 适用场景与选型建议
shopigo/magento2-extension-ajax-listing 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 15.07k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2019 年 02 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 shopigo/magento2-extension-ajax-listing 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 shopigo/magento2-extension-ajax-listing 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 15.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: OSL-3.0
- 更新时间: 2019-02-07