1、在finder文件夹下建立goods文件夹,再建立error.php
class b2c_finder_error { var $detail_edit = '详细列表'; function detail_edit($id) { $render = app::get('b2c')->render(); $item = app::get('b2c')->model('goods_error')->getRow('*', array('ers_id' => $id)); $member = app::get('pam')->model('members')->getRow('login_account', array('member_id' => $item['member_id'])); $item['uname'] = $member['login_account']; $render->pagedata['item'] = $item; $goods_data = app::get('b2c')->model('goods')->getRow('name,image_default_id', array('goods_id' => $item['goods_id'])); $product_data = app::get('b2c')->model('products')->getRow('product_id', array('goods_id' => $item['goods_id'], 'is_default' => 'true')); $goods_data['url'] = app::get('site')->router()->gen_url(array('app' => 'b2c', 'ctl' => 'site_product', 'full' => 1, 'act' => 'index', 'arg' => $product_data['product_id'])); $render->pagedata['goods'] = $goods_data; $render->display('admin/goods/error.html'); } }
2、在services.xml加上
<service id="desktop_finder.b2c_mdl_goods_error">
<class>b2c_finder_goods_error</class>
</service>
3、更新app