PHPackages                             zakharov-andrew/yii2-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. [Admin Panels](/categories/admin)
4. /
5. zakharov-andrew/yii2-shop

ActiveYii2-extension[Admin Panels](/categories/admin)

zakharov-andrew/yii2-shop
=========================

Yii2 Shop

v0.3.8(6mo ago)680[2 issues](https://github.com/ZakharovAndrew/yii2-shop/issues)MITPHPPHP &gt;=7.3

Since Jul 28Pushed 6mo ago3 watchersCompare

[ Source](https://github.com/ZakharovAndrew/yii2-shop)[ Packagist](https://packagist.org/packages/zakharov-andrew/yii2-shop)[ RSS](/packages/zakharov-andrew-yii2-shop/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (40)Used By (0)

🚀 Yii2 Shop: Launch Your Online Store in Minutes!
=================================================

[](#-yii2-shop-launch-your-online-store-in-minutes)

[![Latest Stable Version](https://camo.githubusercontent.com/3d4e4cf828b55b1e4866efcde4a8e0ef228a6777a23bcd14d0960d7aa0f792b0/68747470733a2f2f706f7365722e707567782e6f72672f7a616b6861726f762d616e647265772f796969322d73686f702f762f737461626c65)](https://packagist.org/packages/zakharov-andrew/yii2-shop)[![Total Downloads](https://camo.githubusercontent.com/8eb6e754545390897b2b8d2788d07e91efdf673942515e5b4abcf2c4663c7602/68747470733a2f2f706f7365722e707567782e6f72672f7a616b6861726f762d616e647265772f796969322d73686f702f646f776e6c6f616473)](https://packagist.org/packages/zakharov-andrew/yii2-shop)[![License](https://camo.githubusercontent.com/10ad23ff9b29ca81bb74d395e2c7223604da9e1942b976b4d479dc777d87a4d2/68747470733a2f2f706f7365722e707567782e6f72672f7a616b6861726f762d616e647265772f796969322d73686f702f6c6963656e7365)](https://packagist.org/packages/zakharov-andrew/yii2-shop)[![Yii2](https://camo.githubusercontent.com/d6b0929173e28cc627430d2519ca1853466a70f37395877eaf4820cb3e1e1909/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f77657265645f62792d5969695f4672616d65776f726b2d677265656e2e7376673f7374796c653d666c6174)](http://www.yiiframework.com/)

Yii2 shop module. A module for creating an online store based on Yii2. This module provides basic functionality for managing products, categories, orders, and other elements of an e-commerce store.

 [Features](#-features) • [Installation](#-installation) • [Usage](#-usage) • [Contributing](#-contributing) • [License](#-license)

 [🇷🇺 Русская версия](README.ru.md)

---

✨ Features
----------

[](#-features)

- **📦 Product Management**

    - Create, edit, and delete products.
    - Add attributes and specifications to products.
    - Upload product images.
    - Manage product stock levels.
    - Multi-store support
- **🗂️ Categories and Filters**

    - Hierarchical category system.
    - Support for subcategories.
    - Filter products by attributes (color, size, price, etc.).
    - Flexible filter configuration for categories.
- **📝 Order Management**

    - Create and manage orders.
    - Order statuses (new, processing, delivered, canceled, etc.).
    - Order history and change tracking.
    - Support for various delivery methods.
- **🛒 Shopping Cart and Checkout**

    - Add products to the cart.
    - Edit the cart (change quantities, remove products).
    - Checkout with customer details.
    - Coupon and discount support *(planned for future updates)*.
- **👤 User and Role Management**

    - User registration and authentication.
    - Role and permission management (admin, manager, customer).
    - User account with order history.
- **🔍 Search and SEO**

    - Search products by name, description, and attributes.
    - SEO optimization: meta tags, human-readable URLs (slug).
    - Sitemap generation (sitemap.xml).
- **🌐 Multilingual Support**

    - Support for multiple languages in the store interface.
- **📊 Analytics and Reports**

    - Sales reports.
    - Product popularity analysis.
    - Export data to CSV, Excel, and other formats.
- **⚙️ Store Settings**

    - Flexible configuration of core store parameters.
    - Email notification settings for customers and administrators.

🚀 Installation
--------------

[](#-installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ composer require zakharov-andrew/yii2-shop

```

or add

```
"zakharov-andrew/yii2-shop": "*"

```

to the `require` section of your `composer.json` file.

Subsequently, run

```
./yii migrate/up --migrationPath=@vendor/zakharov-andrew/yii2-shop/migrations

```

in order to create the settings table in your database.

Or add to console config

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

🛠 Usage
-------

[](#-usage)

Add this to your main configuration's modules array

```
    'modules' => [
        'shop' => [
            'class' => 'ZakharovAndrew\shop\Module',
            'catalogTitle' => 'Catalog Title',
            'storeName' => 'My Store',
            'bootstrapVersion' => 5, // if use bootstrap 5
            'deliveryMethods' => [
                1 => 'Courier delivery',
                2 => 'Pickup from store',
                3 => 'Postal delivery'
            ],
            'defaultProductImage' => '/images/default-product-image.jpg', // Path to the default image for a product
            'uploadWebDir' => '/web/path/to/upload/dir/'
        ],
        'imageupload' => [
            'class' => 'ZakharovAndrew\imageupload\Module',
            'uploadDir' => '/path/to/upload/dir/',
        ],
        // ...
    ],
```

**Note**: the maximum number of additional parameters is 3. Change the value of **uploadDir** to the directory for uploading images. Uses the [yii2-image-upload-widget](https://github.com/ZakharovAndrew/yii2-image-upload-widget) module to upload images.

Add this to your main configuration's urlManager array

```
'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
                // ...
                'catalog/' => 'shop/product-category/view',
                'catalog' => 'shop/catalog/index',
                'product/' => 'shop/product/view',
                'tag/' => 'product-tag/view',
                'cart' => 'shop/cart/index',
                'checkout' => 'shop/checkout/index',
                'admin/orders' => 'shop/admin-order/index',
                'admin/orders/' => 'shop/admin-order/view',
                'admin/orders/update-status/' => 'shop/admin-order/update-status',
                // ...
            ],
        ],
```

Register the component in config/web.php:

```
'components' => [
    'shopSettings' => [
        'class' => 'ZakharovAndrew\shop\components\ShopSettings',
    ],
    // ...
],
```

🎯 Product Swiper Widget
-----------------------

[](#-product-swiper-widget)

The ProductSwiperWidget allows you to create beautiful product sliders with swiper functionality.

### Basic Usage

[](#basic-usage)

```

```

### Display Specific Products by IDs

[](#display-specific-products-by-ids)

```
