PHP code example of zakharov-andrew / yii2-shop

1. Go to this page and download the library: Download zakharov-andrew/yii2-shop library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zakharov-andrew / yii2-shop example snippets


return [
    // ...
    'controllerMap' => [
        // ...
        'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
            'migrationPath' => [
                '@console/migrations', // Default migration folder
                '@vendor/zakharov-andrew/yii2-shop/src/migrations'
            ]
        ]
        // ...
    ]
    // ...
];

'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
                // ...
                'catalog/<url:[\w\-]+>' => 'shop/product-category/view',
                'catalog' => 'shop/catalog/index',
                'product/<url:[\w\d\-]+>' => 'shop/product/view',
                // ...
            ],
        ],