chuckbe / chuckcms-module-order-form
Order Form module for use in ChuckCMS
Installs: 222
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:Blade
Requires
- php: >=7.2.0
- laravel/framework: ^6.20.26||^7.30.4||^8.82.2||^9.0||^10.0
- maatwebsite/excel: ^3.1
- dev-master
- v0.2.24
- v0.2.23
- v0.2.22
- v0.2.21
- v0.2.20
- v0.2.19
- v0.2.18
- v0.2.17
- v0.2.16
- v0.2.15
- v0.2.14
- v0.2.13
- v0.2.12
- v0.2.11
- v0.2.10
- v0.2.9
- v0.2.8
- v0.2.7
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.14
- v0.1.13
- v0.1.12
- v0.1.11
- v0.1.10
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-phpean
- dev-feature/check-for-dates
- dev-orderformexpansion
This package is auto-updated.
Last update: 2024-11-21 18:31:56 UTC
README
Requirements
- Laravel v6.2 or higher
- ChuckCMS v0.1.39 or higher
- Bootstrap v4.0 or higher
- jQuery v3.2.1 or higher
Installation
- Use composer to install
composer require chuckbe/chuckcms-module-order-form
- Publish config
php artisan vendor:publish --provider="Chuckbe\ChuckcmsModuleOrderForm\ChuckcmsModuleOrderFormServiceProvider" --tag=order-form-config
- Publish migrations
php artisan vendor:publish --provider="Chuckbe\ChuckcmsModuleOrderForm\ChuckcmsModuleOrderFormServiceProvider" --tag=order-form-migrations
- Publish assets
php artisan vendor:publish --provider="Chuckbe\ChuckcmsModuleOrderForm\ChuckcmsModuleOrderFormServiceProvider" --tag=order-form-assets
- Publish views
php artisan vendor:publish --provider="Chuckbe\ChuckcmsModuleOrderForm\ChuckcmsModuleOrderFormServiceProvider" --tag=order-form-views
Or publish all at once!
php artisan vendor:publish --provider="Chuckbe\ChuckcmsModuleOrderForm\ChuckcmsModuleOrderFormServiceProvider" --tag=order-form-config
- Run migrations
php artisan migrate
- Install module in ChuckCMS
php artisan chuckcms-module-order-form:install
Usage
- After installation make sure to add a location, add a category and a product.
- Create a page for the order form in ChuckCMS and use a custom template file
- Inside that custom template file you can use the following method to call the necessary files
//use this to load css and styles
{!! ChuckModuleOrderForm::renderStyles() !!}
//use this to load js and scripts
{!! ChuckModuleOrderForm::renderScripts() !!}
//use this to load the form itself - do not wrap it in a container
{!! ChuckModuleOrderForm::renderForm() !!}
- Create a page for the order followup in ChuckCMS and use another custom template file
- Inside that custom template file you can use the following method to call the necessary files
//use this to load css and styles
@if(session('order_number'))
{!! ChuckModuleOrderForm::followupStyles(session('order_number')) !!}
@endif
//use this to load js and scripts
@if(session('order_number'))
{!! ChuckModuleOrderForm::followupScripts(session('order_number')) !!}
@endif
//use this to load the followup content itself - do not wrap it in a container
@if(session('order_number'))
{!! ChuckModuleOrderForm::followupContent(session('order_number')) !!}
@endif
- Update config file for necessary settings
- Add products
- Start accepting orders!
Methods
ChuckModuleOrderForm::firstAvailableDate(string $location)
This method accepts a location key as used in the config file and will return the first available date for ordering
ChuckModuleOrderForm::firstAvailableDateInDaysFromNow(string $location)
This method accepts a location key as used in the config file and will return the first available date for ordering in number of days from now
ChuckModuleOrderForm::totalSales()
The total amount of sales returned as formatted (no thousands separator, 2 decimals, ',' as a decimal separator) result
ChuckModuleOrderForm::totalSalesLast7Days()
The total amount of sales of the last 7 days returned as formatted result
ChuckModuleOrderForm::totalSalesLast7DaysQty()
The total number of sales of the last 7 days returned as integer
Security
Any security bugs discovered, please email to karel@chuck.be instead of using the issue reporter.
License
© MIT License