Nuvish Posted April 5, 2011 Share Posted April 5, 2011 How to add a new attribute in admin products page?for example,add a new column 'favorite' between the other attributes.Iv added a new field in the database of prestashop,table:ps_category_product,iv added favorite(tinyint).By adding this line in adminproducts.php: ---> 'favorite' => array('title' => $this->l('Favorite'),'active' => 'favorite', 'width' => 30, 'align' => 'center','type' => 'bool','orderby' => false),This makes favorite appear in the admin catalog page.Then iv added cp.`favorite` like this in the codes :$this->_select = 'cp.`position`,cp.`favorite`, i.`id_image`,(a.`price` * ((100 + (t.`rate`))/100)) AS price_final';This makes the small red crosses appear in the page,in the favorite column.But then,how to make all this work?like when i click on a cross,it updates the database(favorite field) and actually make the product become a favorite one. Link to comment Share on other sites More sharing options...
BWT Posted April 10, 2011 Share Posted April 10, 2011 =) Have a good day my friends! Link to comment Share on other sites More sharing options...
Nuvish Posted April 12, 2011 Author Share Posted April 12, 2011 i've got it to work..But this is not the proper way to do it,as core has to be changed.Now,this override thing bugs me. Link to comment Share on other sites More sharing options...
Nuvish Posted May 19, 2011 Author Share Posted May 19, 2011 I think this can be done by creating a module to override the adminproducts.like here - http://www.ebizness-services.com/white_papers/prestashop/admin_overrideBut iv been unable to get this to work.. 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