tomaivanovtomov/yii2-order

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.4 2018-04-25 12:03 UTC

This package is not auto-updated.

Last update: 2024-05-17 01:45:24 UTC


README

Installation

composer require tomaivanovtomov/yii2-order "1.0.6"

Configuration

Add the Module class to `config.php`:
'modules' => [
    ....
    'orders' => [
        'class' => 'tomaivanovtomov\order\Module',
    ],
    ....
],

Add migrations

Migrate tables
php yii migrate/up --migrationPath=@vendor/tomaivanovtomov/yii2-order/migrations

Register assets

Register order assets on top of your `layout\main.php`
\tomaivanovtomov\order\OrderAssets::register($this);

Image path is set to www.example.com/frontend/web .

Usage

CRUDs and index action:

orders/order/index
orders/currency/index
orders/payment-type/index
orders/status/index

Multilingual part

Copy these line in `params.php`:
'language-information' => [
    'BG' => [
        'title' => 'Български',
        'extension' => 'bg',
    ],
    'EN' => [
        'title' => 'English',
        'extension' => 'en',
    ],
],
'languageDefault' => 'bg'

This portion of code is linked with the multilingual model functionality. You can override the model and adapt it to your needs.