PHPackages                             black-lamp/blcms-shop - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. black-lamp/blcms-shop

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

black-lamp/blcms-shop
=====================

Shop module for Black-Lamp CMS

v0.5.21(8y ago)1613[1 PRs](https://github.com/black-lamp/blcms-shop/pulls)6PHPPHP &gt;=7.0

Since May 26Pushed 8y ago3 watchersCompare

[ Source](https://github.com/black-lamp/blcms-shop)[ Packagist](https://packagist.org/packages/black-lamp/blcms-shop)[ RSS](/packages/black-lamp-blcms-shop/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (12)Versions (119)Used By (6)

**Applying migrations:****!Important: this migrations must be applied after Dectrium-User module migrations.**

```
- php yii migrate --migrationPath=@yii/rbac/migrations
- php yii migrate --migrationPath=@vendor/black-lamp/blcms-shop/migrations
```

For cart module:

```
- php yii migrate --migrationPath=@vendor/black-lamp/blcms-cart/migrations
```

**Configuration for Imagable module:**

```
        'shop_imagable' => [
            'class' => bl\imagable\Imagable::className(),
            'imageClass' => \bl\imagable\instances\CreateImageImagine::className(),
            'nameClass' => bl\imagable\name\CRC32Name::className(),
            'imagesPath' => '@frontend/web/images',
            'categories' => [
                'origin' => false,
                'category' => [
                    'shop-product' => [
                        'origin' => false,
                        'size' => [
                            'big' => [
                                'width' => 1500,
                                'height' => 500
                            ],
                            'thumb' => [
                                'width' => 500,
                                'height' => 500,
                            ],
                            'small' => [
                                'width' => 150,
                                'height' => 150
                            ]
                        ]
                    ],
                    'shop-vendors' => [
                        'origin' => false,
                        'size' => [
                            'big' => [
                                'width' => 1500,
                                'height' => 500
                            ],
                            'thumb' => [
                                'width' => 320,
                                'height' => 240,
                            ],
                            'small' => [
                                'width' => 150,
                                'height' => 150
                            ]
                        ]
                    ],
                    'delivery' => [
                        'origin' => false,
                        'size' => [
                            'big' => [
                                'width' => 1500,
                                'height' => 500
                            ],
                            'thumb' => [
                                'width' => 500,
                                'height' => 500,
                            ],
                            'small' => [
                                'width' => 150,
                                'height' => 150
                            ]
                        ]
                    ],
                    'shop-category/cover' => [
                        'origin' => false,
                        'size' => [
                            'big' => [
                                'width' => 1500,
                                'height' => 500
                            ],
                            'thumb' => [
                                'width' => 500,
                                'height' => 500,
                            ],
                            'small' => [
                                'width' => 150,
                                'height' => 150
                            ]
                        ]
                    ],
                    'shop-category/thumbnail' => [
                        'origin' => false,
                        'size' => [
                            'big' => [
                                'width' => 1500,
                                'height' => 500
                            ],
                            'thumb' => [
                                'width' => 500,
                                'height' => 500,
                            ],
                            'small' => [
                                'width' => 150,
                                'height' => 150
                            ]
                        ]
                    ],
                    'shop-category/menu_item' => [
                        'origin' => false,
                        'size' => [
                            'big' => [
                                'width' => 1500,
                                'height' => 500
                            ],
                            'thumb' => [
                                'width' => 500,
                                'height' => 500,
                            ],
                            'small' => [
                                'width' => 150,
                                'height' => 150
                            ]
                        ]
                    ],
                    'payment' => [
                        'origin' => false,
                        'size' => [
                            'big' => [
                                'width' => 1500,
                                'height' => 500
                            ],
                            'thumb' => [
                                'width' => 500,
                                'height' => 500,
                            ],
                            'small' => [
                                'width' => 150,
                                'height' => 150
                            ]
                        ]
                    ],
                ]
            ]
        ],
```

### Add module to your backend config

[](#add-module-to-your-backend-config)

```
    'bootstrap' => [
        //'bl\cms\shop\backend\components\events\PartnersBootstrap',
        'bl\cms\shop\backend\components\events\ShopLogBootstrap',
        'bl\cms\cart\backend\components\events\CartBootstrap',
    ],
    'modules' => [
        'shop' => [
            'class' => 'bl\cms\shop\backend\Module',
            'enableCurrencyConversion' => true
        ]
    ],
    'components' => [
        'urlManagerFrontend' => [
            'class' => bl\multilang\MultiLangUrlManager::className(),
            'baseUrl' => '/',
            'showScriptName' => false,
            'enablePrettyUrl' => true,
            'enableDefaultLanguageUrlCode' => false,
            'rules' => [
                [
                    'class' => bl\articles\UrlRule::className()
                ],
                [
                    'class' => bl\cms\shop\UrlRule::className(),
                    'prefix' => 'shop'
                ],
            ]
        ]
    ]
```

### Add module to your frontend config

[](#add-module-to-your-frontend-config)

```
    'modules' => [
    	...
        'shop' => [
                    'class' => bl\cms\shop\frontend\Module::className(),
                    'enableCurrencyConversion' => true,
                    'partnerManagerEmail' => $params['partnerManagerEmail'],
                    'senderEmail' => $params['senderEmail'],
                    'showChildCategoriesProducts' => false
                ],
        ...
    ],

    'components' => [
        ...
        'urlManager' => [
            ...
            'rules' => [
                ...
                [
                    'class' => bl\cms\shop\UrlRule::className(),
                    'prefix' => 'shop'
                ]
            ],
            ...
        ],
        'partnerMailer' => [
                    'class' => yii\swiftmailer\Mailer::className(),
                    'useFileTransport' => false,
                    'messageConfig' => [
                        'charset' => 'UTF-8',
                    ],
                    'viewPath' => '@vendor/black-lamp/blcms-shop/frontend/views/partner-request/mail',
                    'htmlLayout' => '@vendor/black-lamp/blcms-shop/frontend/views/partner-request/mail/layout',
                    'transport' => [
                        'class' => 'Swift_SmtpTransport',
                        'username' => 'info@mail.com',
                        'password' => '55555555',
                        'host' => 'pop.mail.com',
                        'port' => '587',
                    ],
                ],
        ...
    ]

    'bootstrap' => [
        'bl\cms\shop\frontend\components\events\PartnersBootstrap',
        'bl\cms\cart\frontend\components\events\UserRegistrationBootstrap'
    ],
```

**If you need some console import scripts:**

```
    'modules' => [
        'shop' => [
            'class' => \bl\cms\shop\console\Module::className(),
            'importActions' => [
                'basic' => [
                    'class' => bl\cms\shop\console\actions\import\BasicAction::className()
                ]
            ]
        ]
    ],
```

**REQUIRES**

- PHP-version: 7.0 or later
- PHP-extensions: file-info, imagick, intl

**Roles and its permissions:**

*attributeManager*

- addAttributeValue
- deleteAttribute
- saveAttribute
- viewAttributeList

*countryManager*

- saveCountry
- viewCountryList
- deleteCountry

*currencyManager*

- updateCurrency
- viewCurrencyList
- deleteCurrency

*deliveryMethodManager*

- saveDeliveryMethod
- viewDeliveryMethodList
- deleteDeliveryMethod

*filterManager*

- deleteFilter
- saveFilter
- viewFilterList

*orderManager*

- deleteOrder
- deleteOrderProduct
- viewOrder
- viewOrderList

*orderStatusManager*

- saveOrderStatus
- viewOrderStatusList
- deleteOrderStatus

*productAvailabilityManager*

- saveProductAvailability
- viewProductAvailabilityList
- deleteProductAvailability

*productManager*

- createProduct
- createProductWithoutModeration
- deleteOwnProduct
- deleteProduct
- updateOwnProduct
- updateProduct
- viewCompleteProductList
- viewProductList

*productPartner*

- accessAdminPanel
- createProduct
- createProductWithoutModeration
- deleteOwnProduct
- deleteProduct
- updateOwnProduct
- updateProduct
- viewCompleteProductList
- viewProductList

*shopCategoryManager*

- saveShopCategory
- viewShopCategoryList

*vendorManager*

- saveVendor
- viewVendorList
- deleteVendor

*shopAdministrator*extends permissions from all managers.

**WIDGETS**

*Recommended products*

*Example:*

```

```

Also you may use bl\\cms\\shop\\widgets\\assets\\RecommendedProductsAsset in your view.

*Filtration widget*

To use the widget, you must have set up relations in the models. For example in model Product:

```
    /**
     * @return \yii\db\ActiveQuery
     */
    public function getProductCountry()
    {
        return $this->hasOne(ProductCountry::className(), ['id' => 'country_id']);
    }
```

**LOGGING**

Your application can record how many people watched a particular product. To enable logging, you must add the following settings in the frontend configuration file:

```
public $log = [
        'enabled' => true,
        'maxProducts' => 10 // Max number of viewed products by one user.
    ];

```

In it, you specify the number of products, which is stored in the table shop\_product\_views for one user. This value can be 'all', ie infinitely.

If the 'maxProducts' property value is "all", the "views" of Product object increases by one for a registered user once. Otherwise it will increase by one each time when registered user views product.

**TRANSLATIONS**

The module has translations on several languages. If there is not your language or if you would like change its on your own, you can configure it in backend or frontend configuration file:

```
'i18n' => [
            'translations' => [
                'shop' => [
                    'class' => 'yii\i18n\PhpMessageSource',
                    'basePath' => '@backend/messages',
                    'sourceLanguage' => 'en-us',
                ]
            ],
        ],

```

**REPORTS**

- "Class 'Imagick' not found"

If you use OpenServer with PHP 7, you must install Imagick extension like here [http://open-server.ru/forum/viewtopic.php?f=4&amp;t=2897&amp;hilit=imagick](http://open-server.ru/forum/viewtopic.php?f=4&t=2897&hilit=imagick)

**Products displaying**

You can select one of two modes: showing products of current category and its children or only current category. Use property $showChildCategoriesProducts in frontend Module class configuration. migration:

**Logging**This configuration is for Shop module and Cart module.

For enable logging add log component to your common configuration file:

```
'components' => [
        'log' => [
            'targets' => [
                [
                    'logTable' => 'shop_log',
                    'class' => 'yii\log\DbTarget',
                    'levels' => ['info'],
                    'categories' => [
                        'afterCreateProduct', 'afterDeleteProduct', 'afterEditProduct',
                        'afterCreateCategory', 'afterEditCategory', 'afterDeleteCategory',
                    ],
                ],
                [
                    'logTable' => 'cart_log',
                    'class' => 'yii\log\DbTarget',
                    'levels' => ['info'],
                    'categories' => [
                        'afterChangeOrderStatus'
                    ],
                ],
                [
                    'logTable' => 'user_log',
                    'class' => 'yii\log\DbTarget',
                    'levels' => ['info'],
                    'categories' => [
                        'afterRegister', 'afterConfirm'
                    ],
                ],
            ],
        ],

```

Then apply migration, but only after you will configure your app. The migration will create tables for log targets, which are listed in configuration.

```
php yii migrate --migrationPath=@yii/log/migrations/

```

In backend and frontend configuration of your module add

```
'enableLog' => true,

```

**Vendor list**

- /shop/vendor

**Partner requests email**Create new templates 'partner-request-manager' and 'partner-request-partner': /admin/email-templates/default/list

You can use next variables: '{contact\_person}', '{company\_name}', '{website}', '{message}', '{name}', '{surname}', '{patronymic}', '{info}'

Also create template 'partner-request-accept' without variables.

Information about new product by product partner to manager - template 'new-product-to-manager'. You can use next variables: {productId}, {title}, {ownerId}, {ownerEmail}, {owner}, {link} For sending information abount new product to partner which created this product, add template 'new-product-to-partner' with variables {productId}, {title}, {ownerId}, {ownerEmail}, {owner}, {link}.

If product is moderated and status is 'accept' the mail 'accept-product-to-owner' will be sent. You may use variables: {title}, {ownerEmail}, {owner}, {link}

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 57% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Recently: every ~52 days

Total

117

Last Release

3135d ago

PHP version history (2 changes)0.0.1PHP &gt;=5.4.0

v0.1.10PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e1784ec992318bf7ed40a2025a0ca035a01143de89054f0f4c9bc39469928c1?d=identicon)[GutsVadim](/maintainers/GutsVadim)

---

Top Contributors

[![GutsVadim](https://avatars.githubusercontent.com/u/9513738?v=4)](https://github.com/GutsVadim "GutsVadim (151 commits)")[![nojes](https://avatars.githubusercontent.com/u/17221145?v=4)](https://github.com/nojes "nojes (113 commits)")[![varmtech13](https://avatars.githubusercontent.com/u/36410324?v=4)](https://github.com/varmtech13 "varmtech13 (1 commits)")

---

Tags

yii2shopblcms

### Embed Badge

![Health badge](/badges/black-lamp-blcms-shop/health.svg)

```
[![Health](https://phpackages.com/badges/black-lamp-blcms-shop/health.svg)](https://phpackages.com/packages/black-lamp-blcms-shop)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
