Yichong Posted November 15, 2016 Share Posted November 15, 2016 How to add a field in the products list admin page like UPC? Link to comment Share on other sites More sharing options...
Martin Uker K Posted November 15, 2016 Share Posted November 15, 2016 (edited) You must override the adminProduct to meet your ends. The method to override is "__construct()", you must add "upc" to the field_list array. You can just Push it at the end or remplace reference via array_splice, that's up to you! <?php class AdminProductsController extends AdminProductsControllerCore { public function __construct() { parent::__construct(); $this->fields_list['upc'] = array( 'title' => $this->l('upc'), ); } } It should look like this in the end. Didn't test it, but since I'm pretty confident...(the force must be strong within me if that works). If you use override, don't forget to regenerate your calss_index. Sorry, I first answered in French, I'm giving support in 3 languages, I get mixed up sometime! Sorry! Martin. Edited November 15, 2016 by Martin Uker K (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now