Karabisht Posted April 5, 2014 Share Posted April 5, 2014 (edited) Hi all prestashop experts I am new to this 1.6 Prestashop system and start to config my shop with the new released prestashop. I would like to change the " Condition New " options in my shop. I would like to add serval more options to this menu and also change the text of the existing options. But sadly I dont have the expertis that is required. I mean options "new, used, refurbished" Where do I manage to find this coding?, is it even possible? Edited April 5, 2014 by Karabisht (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted April 5, 2014 Share Posted April 5, 2014 you can change these texts under localization > translations > front office translations. in back office you will still see "new, used, refurbished", but in FO you will see translated versions. Link to comment Share on other sites More sharing options...
Karabisht Posted April 5, 2014 Author Share Posted April 5, 2014 Okej great thank you very much, do you know how I add more options to this list? Link to comment Share on other sites More sharing options...
vekia Posted April 5, 2014 Share Posted April 5, 2014 in this case you have to modify admin template file, there is no other way to achieve it. /admin_dir/default/template/controllers/products/informations.tpl <select name="condition" id="condition"> <option value="new" {if $product->condition == 'new'}selected="selected"{/if} >{l s='New'}</option> <option value="used" {if $product->condition == 'used'}selected="selected"{/if} >{l s='Used'}</option> <option value="refurbished" {if $product->condition == 'refurbished'}selected="selected"{/if}>{l s='Refurbished'}</option> </select> add there new <option> field with own conditions. remember to modify product.tpl file to handle this new condition 1 Link to comment Share on other sites More sharing options...
Karabisht Posted April 6, 2014 Author Share Posted April 6, 2014 in this case you have to modify admin template file, there is no other way to achieve it. /admin_dir/default/template/controllers/products/informations.tpl <select name="condition" id="condition"> <option value="new" {if $product->condition == 'new'}selected="selected"{/if} >{l s='New'}</option> <option value="used" {if $product->condition == 'used'}selected="selected"{/if} >{l s='Used'}</option> <option value="refurbished" {if $product->condition == 'refurbished'}selected="selected"{/if}>{l s='Refurbished'}</option> </select> add there new <option> field with own conditions. remember to modify product.tpl file to handle this new condition Thank you very much vekia, it seems that I am close by now. But still there is something not working correct when saving product details I get msg: Property Product->condition has bad value (allowed values are: new, used, refurbished) I have configerd both \adminxxx\themes\default\template\controllers\products - informations.tpl \themes\default-bootstrap - product.tpl both files has the same value for the newly added conditions. Link to comment Share on other sites More sharing options...
Karabisht Posted April 7, 2014 Author Share Posted April 7, 2014 Any suggestion in this, I can feel the victory almost there Link to comment Share on other sites More sharing options...
Karabisht Posted April 24, 2014 Author Share Posted April 24, 2014 Anyone know where I would find the correct text to change ? Property Product->condition has bad value (allowed values are: new, used, refurbished) Condition does not exist A - This on the newly added conditions? Link to comment Share on other sites More sharing options...
vekia Posted April 24, 2014 Share Posted April 24, 2014 Anyone know where I would find the correct text to change ? Property Product->condition has bad value (allowed values are: new, used, refurbished) Condition does not exist A - This on the newly added conditions? it's necessary to modify product class in fields definition there is a entry: 'condition' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isGenericName', 'values' => array('new', 'used', 'refurbished'), 'default' => 'new'), you have to add your new conditions to array: array('new', 'used', 'refurbished') for example: array('new', 'used', 'refurbished', 'mynewcondition', 'anothercondition') 1 Link to comment Share on other sites More sharing options...
kadapawn Posted July 29, 2014 Share Posted July 29, 2014 All things look good, but for some reason the new condition is not saved when saved in BO product editor and do not show in FO... any ideas? Link to comment Share on other sites More sharing options...
vekia Posted July 29, 2014 Share Posted July 29, 2014 have you added your new condition to object definition? i mean to array array('new', 'used', 'refurbished', 'yourCondition') ? Link to comment Share on other sites More sharing options...
kadapawn Posted July 29, 2014 Share Posted July 29, 2014 (edited) yes. My condition is regauto. I use ps.1.6.0.6 and i have added for example: in classes/product.php 'condition' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isGenericName', 'values' => array('new', 'used', 'refurbished', 'regauto'), 'default' => 'new'), in product.tpl {elseif $product->condition == 'regauto'}{l s='regauto'} in informations.tpl <option value="regauto" {if $product->condition == 'regauto'}selected="selected"{/if}>{l s='regauto'}</option> Thanks Edited July 29, 2014 by kadapawn (see edit history) 2 Link to comment Share on other sites More sharing options...
vekia Posted July 30, 2014 Share Posted July 30, 2014 okay, so if you select "regauto", can you check if it is saved in database? Link to comment Share on other sites More sharing options...
kadapawn Posted July 30, 2014 Share Posted July 30, 2014 okay, so if you select "regauto", can you check if it is saved in database? yeah, i did, is not saved...and for same product is seams i cant select it in the database... Link to comment Share on other sites More sharing options...
vekia Posted July 30, 2014 Share Posted July 30, 2014 one last thing ps_product table condition field add there your new product condition too 2 Link to comment Share on other sites More sharing options...
kadapawn Posted July 30, 2014 Share Posted July 30, 2014 Thank you very much Vekia for helping me with this. After the edit of the ps_product table nothing was changed, but, after i did the same changes in product_shop table all is working fine. So both ps_product and product_shop tables need to have same values.. Thank you again very much, Best Regards Vekia 1 Link to comment Share on other sites More sharing options...
vekia Posted July 30, 2014 Share Posted July 30, 2014 oops i forgot about product_shop table thank you for attention so we have solution 1 Link to comment Share on other sites More sharing options...
Recommended Posts