Similar effects:
First, we need to add a service in services. xml under our own app:
1 <! -- B2C product information extension actions --> 2 <service id = "B2C. goods_finder_actions"> 3 <class> app_ B2C _goods </class> 4 </service>
Then go to the app/base and perform the CMD update operation.
Then you need to add this section under the index method in B2C/controller/admin/goods. php:
1 // Add an extension product list button interface 2 foreach (kernel: servicelist ('B2C. goods_finder_actions ') as $ object) 3 {4 If (is_object ($ object) & method_exists ($ object, 'Get _ extends_actions ')) {5 $ actions = $ object-> get_extends_actions ($ this); 6 $ custom_actions = array_merge ($ custom_actions, $ actions); 7} 8}
Create the corresponding lib folder and file in your app, and run the following code:
1 <? PHP 2 class app_ B2C _goods {3 Public Function get_extends_actions ($ OBJ) {4 $ action [] = array (5 'label' => app: Get ('provision ') -> _ ('button you want to add '), 6 'icon' => 'add.gif ', 7 'href' => 'index. PHP? APP = app & CTL = admin_ B2C _goods & act = youract ', 8 'target' => 'Dialog ::{ title: \' the button you want to add \ ', width: 400, height: 120} '); 9 return $ action; 10} 11}
In this way, you can add actions to the finder of the product list!
Add multiple actions to the product list finder through services