luyadev / luya-module-estore
E-Store
Installs: 46
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 10
Forks: 8
Open Issues: 0
Type:luya-module
Requires
- luyadev/luya-module-admin: dev-master
Requires (Dev)
- luyadev/luya-testsuite: ~1.0.0
This package is auto-updated.
Last update: 2024-12-05 12:41:53 UTC
README
Work in Progress - don't use in Production
Connect the E-Store module to an existing LUYA Instance with or without CMS. The E-Store Module basically provides the Administration Area and the Database Setup. For the Frontend there are some usefull widgets you can use.
For now, you have to create your own controllers and actions in order to access, list or display the models
Things to consider in future development:
- VAT
- Frontend Controllers
- Frontend Widgets
- Mechanism to get all Article Groups
- Language handling based on Admin Ui Language Input.
Installation
Install the module trough composer:
compser require luyadev/luya-module-estore:dev-master
Add the module to the config
'modules' => [ 'estoreadmin' => [ 'class' => 'luya\estore\admin\Module', ] ]
Run the migration and import commands:
./vendor/bin/luya migrate
./vendor/bin/luya import
Go into the groups section and assign the new estore admin permissions to your account. You should now be able to see the administration area.
Controllers and Frontend
Until now this work in progress Module contains only the admin area with all migrations and models. In order to display the products you have to create your own controllers, actions and views:
namespace app\controllers; use luya\web\Controller; use yii\data\ActiveDataProvider; use luya\estore\models\Product; class EstoreController extends Controller { public function actionIndex() { $provider = new ActiveDataProvider([ 'query' => Product::find(), ]); return $this->render('index', [ 'provider' => $provider, ]); } }
ERD
Here you can see how the tables are connected with each other: