abm/wasabi
Composer 安装命令:
composer require abm/wasabi
包简介
Prestashop websocket tool
README 文档
README
A Websocket loosely coupled tool for Prestashop carts, products & combinations
What's Wasabi?
Wasabi is a Websocket based tool, built using Composer & Ratchet to expose data on a Prestashop ecommerce build. It's somewhat beta as well so expect gremlins but not dragons. Mostly tested with 1.5.6.x builds but also experimentally tested with 1.6.x. It's somewhat PSR-4 compliant as well. All database related details should be placed inside a .env file in the root directory, increasing security of the app & moving it towards 12 Factor compliance.
Installation
The easiest path to install is:
-
Download this repo or git clone it
-
Place into relevant Prestashop site in a subdirectory
-
Create & set up the .env file to suit. There's a env.default provided as an example.
-
Run Composer in that subdirectory
composer install -
Watch as it builds in all the dependencies
-
Run a background cron job to keep the index.php file running as a server
-
Open port 8787 on the internal firewall if you haven't already
-
Profit
Usage
Wasabi was originally designed to get product combination data from large scale / enterprise Prestashop ecommerce stores. It has since matured to allow cart & product data to also be captured via websockets.
As of the 0.1 release, there is 1 websocket server that can negotiate carts, products & combinations. How does it do this?
The basic code notation works as follows, and must be passed as a concatenated string (for obvious reasons):
type|data as comma seperated variables
The various types available are:
- cart
- prod
- comb
The 'cart' variable, used in finding related carts for a customer, requires the cart ID followed by the customer ID. Wasabi will return a JSON string with the other cart IDs that customer has along with the time they were created.
The 'prod' variable, used in finding basic product details via Websocket, operates two ways. When the first variable in the data string is not set to 0, it considers that variable the category & then looks in the specific category ID for that product. When that variable is set to 0, it ignores it & just looks at the second variable. In both cases, the second variable is always the product ID. Wasabi will return a JSON string with the same standard variables as a Prestashop product.
The 'comb' variable allows you to find specific combination data, including pricing for a specific product. The data from this variable is used inside most Prestashop product.js files inside the findCombination(firstTime) loop. The first variable in the data stream for this setting is the product ID, followed by each individual combination variable IDs for that product (taken from the product Attributes & Values area). You need to refactor the findCombination(firstTime) function & the data in it to talk to the Wasabi websocket server before you can use it. Wasabi will return a JSON string with the same variables as the Prestashop combinations.
abm/wasabi 适用场景与选型建议
abm/wasabi 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 10 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「websocket」 「ecommerce」 「product」 「cart」 「combination」 「prestashop」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 abm/wasabi 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 abm/wasabi 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 abm/wasabi 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Nevogate Payment Gateway SDK
Simple RSS generator library for PHP 5.5 or later. clone from Bhaktaraz Bhatta ttps://github.com/bhaktaraz/php-rss-generator
Dealing with payments through the Egyptian payment gateway PayMob
Display your categories and products on front end of your website
Product catalog for your Symfony2 applications.
SilverCommerce module that adds customisable products (adding dropdowns, radio buttons or textfields to a product)
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2015-10-26