eluhr / yii2-shop-module
Yii2 Shop Module
Installs: 1 157
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 2
Open Issues: 2
Requires
- dmstr/yii2-helpers: ^0.4.18
- dompdf/dompdf: ^2.0.3
- eluhr/yii2-sortablejs: ^0.0.5
- kartik-v/yii2-editable: ^1.7
- kartik-v/yii2-export: ^1.4
- kartik-v/yii2-number: ^1.0
- kartik-v/yii2-widget-colorinput: ^1.0
- paypal/rest-api-sdk-php: ^1.14
- ramsey/uuid: ^4.1
Suggests
- payrexx/payrexx: Allows usage of the Payrexx payment component
- dev-master
- 2.1.21
- 2.1.20
- 2.1.19
- 2.1.18
- 2.1.17
- 2.1.16
- 2.1.15
- 2.1.14
- 2.1.13
- 2.1.12
- 2.1.11
- 2.1.10
- 2.1.9
- 2.1.8
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-rc5
- 2.0.0-rc4
- 2.0.0-rc3
- 2.0.0-rc2
- 2.0.0-rc1
- v1.x-dev
- 1.2.33
- 1.2.32
- 1.2.31
- 1.2.30
- 1.2.29
- 1.2.28
- 1.2.27
- 1.2.26
- 1.2.25
- 1.2.24
- 1.2.23
- 1.2.22
- 1.2.21
- 1.2.20
- 1.2.19
- 1.2.18
- 1.2.17
- 1.2.16
- 1.2.15
- 1.2.14
- 1.2.13
- 1.2.12
- 1.2.11
- 1.2.10
- 1.2.9
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.5-beta2
- 1.2.5-beta1
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.0.1-rc1
- dev-dev/image-preset
- dev-feature/configurator-wip
This package is auto-updated.
Last update: 2024-10-24 16:12:15 UTC
README
composer require eluhr/yii2-shop-module
Example Config
use kartik\grid\Module as GridViewModule; use eluhr\shop\Module as ShopModule; use eluhr\shop\components\Payment; use eluhr\shop\components\providers\DirectDebitPayment; use eluhr\shop\components\providers\PayPalPayment; use eluhr\shop\components\providers\PayrexxPayment; use eluhr\shop\components\providers\SaferPayPayment; use eluhr\shop\models\Order; use eluhr\shop\components\ShoppingCart; return [ 'aliases' => [ 'eluhr/shop' => '@vendor/eluhr/yii2-shop-module/src' ], 'modules' => [ 'shop' => [ 'class' => ShopModule::class, ], 'gridview' => [ 'class' => GridViewModule::class ] ], 'components' => [ 'shoppingCart' => [ 'class' => ShoppingCart::class ], 'payment' => [ 'class' => Payment::class, 'currency' => 'EUR', 'providers' => [ Order::TYPE_PREPAYMENT => [ 'class' => DirectDebitPayment::class ], Order::TYPE_PAYREXX => [ 'class' => PayrexxPayment::class, 'apiKey' => getenv('PAYREXX_API_KEY'), 'instanceName' => getenv('PAYREXX_INSTANCE_NAME'), 'apiBaseDomain' => getenv('PAYREXX_API_BASE_DOMAIN') ], Order::TYPE_PAYPAL => [ 'class' => PayPalPayment::class, 'mode' => getenv('PAYPAL_MODE'), 'clientId' => getenv('PAYPAL_CLIENT_ID'), 'clientSecret' => getenv('PAYPAL_CLIENT_SECRET') ], Order::TYPE_SAFERPAY => [ 'class' => SaferPayPayment::class, 'baseUrl' => getenv('SAFERPAY_BASE_URL'), 'customerId' => getenv('SAFERPAY_CUSTOMER_ID'), 'terminalId' => getenv('SAFERPAY_TERMINAL_ID'), 'username' => getenv('SAFERPAY_USERNAME'), 'password' => getenv('SAFERPAY_PASSWORD') ] ] ], 'urlManager' => [ 'rules' => [ 'shop' => 'shop/default/index', 'warenkorb/uebersicht' => 'shop/shopping-cart/overview', 'warenkorb/checkout' => 'shop/shopping-cart/checkout', 'warenkorb/meine-bestellung/<orderId>' => 'shop/shopping-cart/prepayment', 'shop/meine-bestellungen' => 'shop/orders/all', 'shop/meine-bestellungen/<orderId>' => 'shop/orders/detail', 'shop/<productTitle>-<productId:\d+>/<variantTitle>-<variantId:\d+>' => 'shop/product/detail', 'shop/<productTitle>-<productId:\d+>' => 'shop/product/detail' ], 'ignoreLanguageUrlPatterns' => [ '#^shop/shopping-cart/check-discount-code#' => '#^shop/shopping-cart/check-discount-code#', '#^shop/dashboard/update-shipping-link#' => '#^shop/dashboard/update-shipping-link#', '#^shop/data/add-tag-to-filter#' => '#^shop/data/add-tag-to-filter#', '#^shop/data/add-tag-to-product#' => '#^shop/data/add-tag-to-product#', '#^shop/data/sort-filter-tags#' => '#^shop/data/sort-filter-tags#', '#^shop/data/sort-products#' => '#^shop/data/sort-products#', '#^shop/data/sort-filters#' => '#^shop/data/sort-filters#', '#^shop/data/sort-variants#' => '#^shop/data/sort-variants#', '#^shop/data/update-email-template#' => '#^shop/data/update-email-template#', '#^shop/data/update-email-template-context-menu#' => '#^shop/data/update-email-template-context-menu#', '#^shop/data/load-template#' => '#^shop/data/load-template#', ] ] ], 'controllerMap' => [ 'migrate' => [ 'migrationPath' => [ '@vendor/eluhr/yii2-shop-module/src/migrations' ] ] ] ];
frontend access (optional)
if you want to add access checks to the frontend controllers, you can add the desired rules via module config
Example:
'modules' => [ 'shop' => [ 'class' => ShopModule::class, # .... other shop configs 'frontendAccessRules' => [ [ 'allow' => true, 'roles' => ['@'], ], ], ], ],
Future plans
- Add orders to user by id and postal
Giiant
docker-compose run --rm php yii shop:crud --appconfig=/app/vendor/eluhr/yii2-shop-module/src/config/giiant.php