定制 chuckbe/chuckcms-module-order-form 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

chuckbe/chuckcms-module-order-form

Composer 安装命令:

composer require chuckbe/chuckcms-module-order-form

包简介

Order Form module for use in ChuckCMS

README 文档

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

统计信息

  • 总下载量: 224
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: Unknown
  • 更新时间: 2020-03-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固