Package Data | |
---|---|
Maintainer Username: | carlospalacin |
Maintainer Contact: | info@syscover.com (SYSCOVER SL) |
Package Create Date: | 2015-04-22 |
Package Last Update: | 2018-11-27 |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2024-11-15 15:09:29 |
Package Statistics | |
---|---|
Total Downloads: | 615 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 3 |
Total Watchers: | 3 |
Total Forks: | 1 |
Total Open Issues: | 1 |
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,
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.
We indicate configuration variables available, to change them what you should do from the file environment variables .env
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
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
Set default ID customer class value for calculate tax amount of products
TAX_CUSTOMER_CLASS=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:
TAX_PRODUCT_PRICES=1
Defines the types of prices that are introduced in shipping prices, this option is consulted when you create or update a shipping price
TAX_SHIPPING_PRICES=1
Defines how you want display product prices You have this values:
TAX_PRODUCT_DISPLAY_PRICES=1
Defines how you want display shipping prices
TAX_SHIPPING_DISPLAY_PRICES=1
PAYPAL_MODE=sandbox
PAYPAL_SANDBOX_WEB_PROFILE=XX-XXXX-XXXX-XXXX-XXXX
PAYPAL_SANDBOX_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PAYPAL_SANDBOX_SECRET=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
PAYPAL_LIVE_WEB_PROFILE=XX-XXXX-XXXX-XXXX-XXXX
PAYPAL_LIVE_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PAYPAL_LIVE_SECRET_KEY=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
REDSYS_MODE=test
REDSYS_TEST_MERCHANT_NAME="MERCHANT NAME (TEST)"
REDSYS_TEST_MERCHANT_CODE=xxxxxxxxx
REDSYS_TEST_KEY=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
REDSYS_LIVE_MERCHANT_NAME="MERCHANT NAME"
REDSYS_LIVE_MERCHANT_CODE=xxxxxxxxx
REDSYS_LIVE_KEY=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
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