pixel88 Posted March 1, 2013 Share Posted March 1, 2013 In the Prestashop v 1.5+ (I'm on 1.5.3.1) BO, when we insert a new product, there is the possibility to set the product condition. There are 3 condition: new, used, refurbished. Can we add, delete or rename the conditions? I found something about the ENUM value in the "ps_product" database table and in some file of the admin controllers and in product classes, but what is the right way? Link to comment Share on other sites More sharing options...
Vince at RockPOS.com Posted March 6, 2013 Share Posted March 6, 2013 Only one way to do it is: +> Change value in database. +> Update tpl in theme. 1 Link to comment Share on other sites More sharing options...
pixel88 Posted March 8, 2013 Author Share Posted March 8, 2013 Only one way to do it is: +> Change value in database. Ok, the ENUM value in the "ps_product" database table. +> Update tpl in theme. Can you kindly list which files I have to update? Link to comment Share on other sites More sharing options...
Vince at RockPOS.com Posted March 11, 2013 Share Posted March 11, 2013 You need change it in file information.tpl (adminfolder/themes/themename/template/controllers/products/information.tpl) go to line 259, and then add an option to selection option have id "condition". Link to comment Share on other sites More sharing options...
atwitz3nd Posted April 16, 2013 Share Posted April 16, 2013 (edited) I'm having the same problem: I'm trying to add a value to the product condition. I can use the 3 native values but I specifically need 4 (or more) I out put the condition value on the product-listing.tpl (which works well with native conditions) Added the new condition enum to the ps_product.conditions table 'new, 'used', 'refurbished', 'upcycled Added the new field value to the drop down options in: information.tpl (adminfolder/themes/themename/template/controllers/products/information.tpl)<br /> <option value="upcycled" {if $product->condition == 'upcycled'}selected="selected"{/if} >{l s='upcycled'}</option> Added the new values to the array settings in: line 285 classes/product.php 'condition' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isGenericName', 'values' => array('new, 'used', 'refurbished', 'upcycled'), 'default' => 'new'), All works fine with no errors to speak of, shows correct in database, lets you select the option in BO, but with this new condition in place, it displays wrong in the front office. Always showing the condition as *new* (which is the default) I must be missing another step somewhere, is there another file which uses this information? I'm so close to solving this, Please help if you can. Just to point me to the mystery file Thank you in advance Edited April 16, 2013 by atwitz3nd (see edit history) 2 Link to comment Share on other sites More sharing options...
omar.bobo Posted May 13, 2013 Share Posted May 13, 2013 (edited) Hi all, I uses the trick detailed by atwitz3nd but I have the same problem, I can't see the new value in Front-end. Edited May 13, 2013 by omar.bobo (see edit history) Link to comment Share on other sites More sharing options...
omar.bobo Posted May 13, 2013 Share Posted May 13, 2013 Hi all, I found the solution! You have to change not only the product table (inserting the new condition value), but also the product_shop table in the same manner. Ciao 7 Link to comment Share on other sites More sharing options...
atwitz3nd Posted May 16, 2013 Share Posted May 16, 2013 Brilliant! Well done Omar.bobo. Works like a dream, Thank you for sparing the time to let me know! xx Link to comment Share on other sites More sharing options...
tekcenter Posted May 17, 2015 Share Posted May 17, 2015 Hi, i'm on Prestashop 1.5.6.2 this method is not working, how to add new conditions on PS 1.5.6.2? also, how to remove condition when the product is a virtual product? regards Link to comment Share on other sites More sharing options...
ZikmaSolutions Posted May 28, 2015 Share Posted May 28, 2015 Same question... I cant find product-listing.tpl on this presta version... Link to comment Share on other sites More sharing options...
abatisa Posted July 25, 2016 Share Posted July 25, 2016 Hi all, solution in PS 1.6.1.4 1. edit in db enum - table ps_product_shop & ps_product row condition 2. in ~/admin/themes/default/temlapte/controller/products/informations.tpl 3. in ~/themes/you_theme_name/product.tpl 4. in ~/classes/Product.php 5. in ~/modules/blocklayered/blocklayered.php Done Link to comment Share on other sites More sharing options...
oriole Posted October 9, 2016 Share Posted October 9, 2016 Thanks abatisa Link to comment Share on other sites More sharing options...
mohamada Posted January 26, 2017 Share Posted January 26, 2017 Hello to all... If I want 3 Product Status Including: 'new, 'used', 'refurbished' , At home Page, On the products show ,What should I do? For example, the Products that Condition they are "used", in home page The Condition of "used" have,What should I do? Generally, In accordance Photo , for the Conformity Condition products With The situation shown in the product image , in home page What should I do? please guide me. Thanks. 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