syscover/market
Composer 安装命令:
composer require syscover/market
包简介
Market package
README 文档
README
Installation
1 - After install Laravel framework, insert on file composer.json, inside require object this value
"syscover/market": "~2.0"
and execute on console:
composer update
2 - Register service provider, on file config/app.php add to providers array
Syscover\Market\MarketServiceProvider::class,
3 - Execute publish command
php artisan vendor:publish
4 - Execute optimize command load new classes
php artisan optimize
5 - And execute migrations and seed database
php artisan migrate
php artisan db:seed --class="MarketTableSeeder"
6 - Execute command to load all updates
php artisan migrate --path=database/migrations/updates
7 - Register middleware pulsar.taxRule on file app/Http/Kernel.php add to routeMiddleware array
'pulsar.taxRule' => \Syscover\Market\Middleware\TaxRule::class,
Activate Package
Access to Pulsar Panel, and go to:
Administration-> Permissions-> Profiles, and set all permissions to your profile by clicking on the open lock.
Go to Administration -> Packages, edit the package installed and activate it.
General configuration environment values
We indicate configuration variables available, to change them what you should do from the file environment variables .env
Order id prefix [default value empty]
You can set a prefix for all your orders, for example, if you can set on all you orders the prefix ORDER, set this value on you .env file
ORDER_ID_PREFIX=ORDER
Tax default country [default value ES]
To set default country to calculate tax, you can use this parameter, for example to change to US, set this value on you .env file
TAX_COUNTRY=US
Default customer class tax [default value 1]
Set default ID customer class value for calculate tax amount of products
TAX_CUSTOMER_CLASS=1
Set product price tax [default value 1]
Defines the types of prices that are introduced in products, this option is consulted when you create or update a product You have this values:
- Value: 1 Excluding tax
- Value: 2 Including tax
TAX_PRODUCT_PRICES=1
Set shipping price tax [default value 1]
Defines the types of prices that are introduced in shipping prices, this option is consulted when you create or update a shipping price
- Value: 1 Excluding tax
- Value: 2 Including tax
TAX_SHIPPING_PRICES=1
Set product display price tax [default value 1]
Defines how you want display product prices You have this values:
- Value: 1 Excluding tax
- Value: 2 Including tax
TAX_PRODUCT_DISPLAY_PRICES=1
Set shipping display price tax [default value 1]
Defines how you want display shipping prices
- Value: 1 Excluding tax
- Value: 2 Including tax
TAX_SHIPPING_DISPLAY_PRICES=1
PayPal environment values
Set PayPal mode
- Value: sandbox for testing or development environments
- Value: live for production environments
PAYPAL_MODE=sandbox
PayPal sandbox values
PAYPAL_SANDBOX_WEB_PROFILE=XX-XXXX-XXXX-XXXX-XXXX
PAYPAL_SANDBOX_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PAYPAL_SANDBOX_SECRET=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
PayPal live values
PAYPAL_LIVE_WEB_PROFILE=XX-XXXX-XXXX-XXXX-XXXX
PAYPAL_LIVE_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PAYPAL_LIVE_SECRET_KEY=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
Redsys environment values
Set Redsys mode
- Value: test for testing or development environments
- Value: live for production environments
REDSYS_MODE=test
Redsys test values
REDSYS_TEST_MERCHANT_NAME="MERCHANT NAME (TEST)"
REDSYS_TEST_MERCHANT_CODE=xxxxxxxxx
REDSYS_TEST_KEY=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
Redsys live values
REDSYS_LIVE_MERCHANT_NAME="MERCHANT NAME"
REDSYS_LIVE_MERCHANT_CODE=xxxxxxxxx
REDSYS_LIVE_KEY=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
Other concepts
Set tax rules values for each customer
When a customer is login on your web application, you need know your country and customer group to calculate tax rules for all products. You have a Middleware who is responsible to do this actions.
Route::group(['middleware' => ['pulsar.taxRule']], function() {
// write here your routes
});
This middleware set market.taxCountry and market.taxCustomerClass if customer has country and customer group id defined
syscover/market 适用场景与选型建议
syscover/market 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 615 次下载、GitHub Stars 达 3, 最近一次更新时间为 2015 年 11 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「marketplace」 「market」 「syscover」 「pulsar」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 syscover/market 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 syscover/market 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 syscover/market 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
YML (Yandex Market Language) parser
Official PHP client (SDK) for the Newsdata.io News API — fetch real-time, historical, crypto, and stock-market news via REST with validation, retries, and error handling.
Automatically translate and review your content via Lokalise.
SDK de integração com a API de pagamentos da Braspag
Alfabank REST API integration
Yandex Market YML generator
统计信息
- 总下载量: 615
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-11-12