jord-jd/exiguous-ecommerce
Composer 安装命令:
composer require jord-jd/exiguous-ecommerce
包简介
Exiguous Ecommerce is a super simple ecommerce library, that uses flat files and takes a very minimalistic approach.
README 文档
README
Exiguous Ecommerce is a super simple ecommerce library, that uses flat files and takes a very minimalistic approach.
Installation
Just run the following Composer command to download/install Exiguous Ecommerce and create relevant autoload files.
composer require jord-jd/exiguous-ecommerce
If your framework does not already do so, you must add require_once "vendor/autoload.php" to any files in which you wish to use Exiguous Ecommerce.
Configuration
Exiguous Ecommerce stores all of its data within a data directory. An example data directory is provided in this package.
Before use, you should then copy the data directory to another location and then specify this location your project's environment.
If you are using Laravel, this can be done by setting an EXIGUOUS_ECOMMERCE_DATA_DIRECTORY variable in your .env file, as follows.
EXIGUOUS_ECOMMERCE_DATA_DIRECTORY=/var/www/ecommerce-site/path-to-data-directory/
If you are not using a framework that supports this, you can use the standard PHP function putenv to set this environment variable.
Alternatively, you could use dotenv-loader to add .env file support to your project.
Please note that it is important the EXIGUOUS_ECOMMERCE_DATA_DIRECTORY variable is set with a trailing slash present.
For security reasons, you should place the data directory in a location which is not web-accessible. In case the data directory is placed in
a web accessible location by accident, a .htaccess file is provided that should deny web users access to the directory's content in most
common web server configurations.
Quick Start Examples
Getting products and categories:
$category = \JordJD\ExiguousEcommerce\Category::findBySlug("fluffy-things"); $products = $category->products(); foreach($products as $product) { echo $product->data->name; }
$product = \JordJD\ExiguousEcommerce\Product::findBySlug("teddy-bear"); $categories = $product->categories(); $mainCategoryName = $categories[0]->data->name;
Getting the current user's basket and adding a product to it:
$product = \JordJD\ExiguousEcommerce\Product::findBySlug("teddy-bear"); $basket = \JordJD\ExiguousEcommerce\Basket::findCurrent(); $basket->addProduct($product); // Add one Teddy Bear $basket->addProduct($product, 2); // Add another two Teddy Bears! var_dump($basket->items); // Outputs an array of, you guessed it, basket items! ^_^ // ^ This would show 1 basket item with a quantity of 3 teddy bears.
Removing a product from a basket:
$product = \JordJD\ExiguousEcommerce\Product::findBySlug("teddy-bear"); $basket = \JordJD\ExiguousEcommerce\Basket::findCurrent(); $basket->removeProduct($product); // Removes all teddy bears from the basket
Setting/Offsetting the quantity of a product in the basket:
$product = \JordJD\ExiguousEcommerce\Product::findBySlug("teddy-bear"); $basket = \JordJD\ExiguousEcommerce\Basket::findCurrent(); $basket->addProduct($product); // Add one Teddy Bear $basket->setProductQuantity($product, 10); // Set the number of Teddy Bears in the basket to ten $basket->offsetProductQuantity($product, 10); // Add ten more Teddy Bears $basket->offsetProductQuantity($product, -5); // Remove five of those Teddy Bears
Migrating the basket to an order:
$basket = \JordJD\ExiguousEcommerce\Basket::findCurrent(); $basket->convertToOrder();
Getting and using settings:
// Retrieves settings from the core.json file within the .settings directory $coreSettings = \JordJD\ExiguousEcommerce\Settings::find('core'); echo $coreSettings->data->primaryCurrency; // Output the ecommerce's primary currency setting
jord-jd/exiguous-ecommerce 适用场景与选型建议
jord-jd/exiguous-ecommerce 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 7, 最近一次更新时间为 2026 年 02 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「ecommerce」 「library」 「PHP Library」 「ecommerce library」 「PHP ecommerce library」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jord-jd/exiguous-ecommerce 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jord-jd/exiguous-ecommerce 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jord-jd/exiguous-ecommerce 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Nevogate Payment Gateway SDK
Dealing with payments through the Egyptian payment gateway PayMob
Inbox pattern process implementation for your Laravel Applications
Core library that defines common interfaces used by the rest of the intahwebz..
Amqp classes
A PHP (and Laravel) package to interface with the Snipcart api.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-only
- 更新时间: 2026-02-14