eluhr/yii2-shop

There is no license information available for the latest version (2.0.0) of this package.

This package's canonical repository appears to be gone and the package has been frozen as a result.

2.0.0 2018-05-03 08:59 UTC

README

composer require eluhr/yii2-shop

Configuration:

$common = [
    'aliases' => [
        '@shop' => '@vendor/eluhr/yii2-shop/src',
        '@eluhr' => '@shop',
    ],
    'params' => [
        'yii.migrations' => [
            '@vendor/eluhr/yii2-shop/src/migrations'
        ]
    ],
    'components' => [
        'shop' => [
                    'class' => 'eluhr\shop\components\Shop',
                ],
        'mailer' => [
            'class' => 'yii\\swiftmailer\\Mailer',
            'htmlLayout' => '@shop/views/mail/layouts/html'
        ]
        ,
        'urlManager' => [
            'class' => 'codemix\localeurls\UrlManager',
            'rules' => [
                '/shop/crud' => '/shop/crud/default/index',
                '/shop/category/<id:[0-9]*>' => '/shop/category',
                '/shop/category/<categoryId:[0-9]*>/item/<id:[0-9]*>' => 'shop/item',
                '/shop/order/status/<token:[a-zA-Z0-9]*>' => 'shop/order/status',
            ],
        ]
    ],
    'modules' => [
        'translatemanager' => [
            'root' => [
                '@app/views',
                '@vendor/eluhr/yii2-shop'
            ]
        ]
    ]
];

$shop = [
    'modules' => [
        'shop' => [
            'class' => 'eluhr\shop\Module',
            'sendMail' => true
        ]
    ]
];

return APP_TYPE === "web" ? yii\helpers\ArrayHelper::merge($common,$shop) : $common;

Example for setting

Section:	shop:de
Key:	    currency
Value:	    €

------------

Section:	shop:en
Key:	    currency
Value:	    $