文件路徑:shop/controllers/Seller/Promotion/IncreaseCtl.php
一、活動列表【方法:index();】
1.套餐過期時間及備注
~~~
if (!$this->self_support_flag) //普通店鋪
{
$com_flag = $this->combo_flag;
if ($this->combo_flag)//套餐可用
{
$combo_row = $this->increaseComboModel->getComboInfo(Perm::$shopId);
}
}
//店鋪下的加價購活動列表
$data = $this->increaseBaseModel->getIncreaseActList($cond_row, array('increase_id' => 'ASC'), $page, $rows);
~~~
2.活動狀態
模型:shop/models/Increase/BaseModel.php
參數:increase_state(0.全部1.正常 2.已結束 3.管理員關閉)
~~~
const NORMAL = 1;//正常
const END = 2;//結束
const CANCEL = 3;//管理員關閉
~~~
3.操作
3.1編輯
參數:id、edit
根據URL獲取id、edit判斷活動列表和活動內容編輯
視圖:views/default/Seller/Promotion/IncreaseCtl/edit.php
編輯活動內容后提交表單驗證:$('#form').validator({})
方法:editIncrease();
~~~
if (request_string('op') == 'edit' && request_int('id'))
{
//編輯活動內容
$increase_id = request_int('id');
$check_row = $this->increaseBaseModel->getIncreaseActItem($increase_id);
if ($check_row['shop_id'] == Perm::$shopId)
{
$data = $this->increaseBaseModel->getIncreaseActDetail($increase_id);
}
else
{
location_to('index.php?ctl=Seller_Promotion_Increase&met=index&typ=e');
}
//視圖:views/default/Seller/Promotion/IncreaseCtl/edit.php
//編輯活動內容后提交表單驗證:$('#form').validator({})
//方法:editIncrease();
$this->view->setMet('edit');
}
~~~
3.1.1添加活動商品
通過AJAX獲得店鋪所有商品
~~~
$('.btn-ctl-select-goods').click(function(){
var increase_id = $(this).attr('data-increase-id');
var url = SITE_URL + '?ctl=Seller_Promotion_Increase&met=getShopGoods&typ=e&op=edit';
$('#cou-sku-options').load(url,{id:increase_id});
});
~~~
3.1.2添加活動規則
選擇換購商品:
~~~
$('body').on('click','[btn-choose-rule-ex-goods]', function() {
var id = $(this).attr('btn-choose-rule-ex-goods');
$("[btn-choose-rule-ex-goods='"+id+"']").hide();
$("[data-cou-level-sku-close-button='"+id+"']").show();
getShopGoodsSku(id);
});
~~~
URL異步請求獲取店鋪可以參加換購的商品:方法:getShopGoodsSku();
視圖:shop/views/default/Seller/Promotion/IncreaseCtl/getShopGoodsSku.php
4.刪除加價購
* 控制器:shop/controllers/Seller/Promotion/IncreaseCtl.php ->removeIncreaseAct()
* 模型:shop/models/Increase/BaseModel.php
* 視圖:shop/views/default/Seller/Promotion/IncreaseCtl/index.php
二、添加活動
1.活動開始時間:不得小于當前時間,且小于套餐結束時間
2.活動結束時間:不得小于當前時間,且小于套餐結束時間
3.提交
新增活動提交時進行表單驗證:`$('#form').validator({})`
* 控制器:shop/controllers/Seller/Promotion/IncreaseCtl.php ->addIncrease()
* 模型:shop/models/Increase/BaseModel.php
* 視圖:shop/views/default/Seller/Promotion/IncreaseCtl/add.php
三、套餐管理【方法:combo();】
1、套餐活動列表
* 控制器:shop/controllers/Seller/Promotion/IncreaseCtl.php ->combo()
* 模型:shop/models/Shop/CostModel.php
* 視圖:shop/views/default/Seller/Promotion/IncreaseCtl/combo.php
套餐活動列表
`$data = $this->shopCostModel->listByWhere($cond_row,$order_row,$page, $rows);`
2.、購買套餐
* 視圖:shop/views/default/Seller/Promotion/IncreaseCtl/combo.php
* 控制器:shop/controllers/Seller/Promotion/IncreaseCtl.php ->addCombo()
* 模型:shop/models/Increase/ComboModel.php
(1)購買套餐時提交時進行表單驗證:`$('#form').validator({})`
(2)在店鋪的賬期結算中扣除相關費用并且在paycenter中添加交易記錄
參數:店鋪id,根據店鋪id號獲取店鋪套餐詳情
1、原套餐已經過期,更新套餐開始時間和結束時間
2、原套餐尚未過期,只需更新結束時間
3、如果沒有套餐詳情,則套餐購買
- 序言
- 系統要求
- 版本更新日志
- 遠豐商城技術對接說明
- 開發指導
- 系統架構
- 負載集群
- 云存儲
- 框架內容
- 基礎
- 開發規范
- 目錄結構
- 架構
- 架構總覽
- 數據庫
- 數據庫連接
- 基本使用
- 緩存
- 配置
- 路由
- 數據字典
- ucenter
- shop
- paycenter
- ucenter_admin
- shop_admin
- paycenter_admin
- shop1
- shop2
- shop3
- 通訊內容
- 商家中心
- 頂部導航欄
- 店鋪信息欄
- 店鋪及商品提示欄
- 交易提示欄
- 銷售情況統計欄
- 集群架構圖
- 單品銷量排行欄
- 店鋪運營推廣欄
- 平臺聯系方式欄
- 訂單物流
- 商品
- 商品列表
- 商品詳情
- 商品發布與編輯
- 分銷商品
- 關聯版式
- 商品規格
- 圖片空間
- 淘寶導入
- 訂單流程
- 交易訂單
- 訂單退款/退貨
- 促銷
- 團購管理
- 加價購
- 限時折扣
- 滿即送
- 代金券管理
- 分銷
- 店鋪
- 店鋪設置
- 自銷產品供應商
- 實體店鋪
- 品牌申請
- 店鋪信息
- 消費者保障服務
- 門店賬號
- 分銷商--產品供應商
- 分銷明細
- 批發市場
- 商家微信公眾號
- 售后服務
- 咨詢管理
- 投訴管理
- 退款管理
- 退貨管理
- 雜項
- 遠程上傳圖片
- 接口(廢棄,參考最外層接口項)
- 接口說明
- 品牌
- 商品規格
- 商品類型
- 商品分類
- 商品
- 訂單
- 商品/店鋪收藏
- 足跡
- 退款及退貨
- 商家店鋪
- 會員
- 入駐協議
- 訂單接口
- 商品接口
- 訂單物流接口
- 商家中心接口
- 促銷接口
- 快遞鳥物流接口
- 代金券接口
- 首頁版塊
- 團購
- 平臺紅包
- 限時折扣接口
- 拼團接口
- wap首頁模板
- JS
- 銀聯支付
- 多語言
- 商品評分
- 圖片加載
- 買家申請退款退貨
- 商家退款退貨
- 平臺退款退貨
- 添加發票
- 提交訂單
- 確認訂單
- 運費銷售區域
- 獲取會員地址
- 充值
- 導出XLS
- 商城系統集成
- 多語言實現
- 三級分銷推廣鏈接發展推廣員
- app.ini.php
- 去分銷
- 版本更新
- 物流支持
- 運營人員建議
- 業務邏輯
- 統計結算
- 客服消息
- 賬號
- 三級分銷
- IM
- 配置
- 平臺帳號
- 活動數據表說明
- 接口
- 數據庫中間鍵
- MyCat的優勢
- 概念說明
- Mycat的下載及安裝
- 參數配置案列
- Mycat讀寫分離
- 基本命令
- 常見錯誤