PrabuSS Posted July 31, 2014 Share Posted July 31, 2014 I have tried to follow this guide to add custome text field(like New condition) under product edit page but informations.tpl file is totally different. I guessed this tutorial is based upon the PS 1.5. I would like to expect this same tutorial for PS 1.6 too. http://mypresta.eu/en/art/developer/new-field-product-backoffice.html Please any one. Kind request to vekia also. Please take a look at this thread and help me. Link to comment Share on other sites More sharing options...
nhelliwell Posted July 31, 2014 Share Posted July 31, 2014 that tutorial is editing the theme directly, the admin theme in 1.6 is certainly different to 1.5, though how much code has changed I'm not sure. You'll need something like this added to the information.tpl <div class="form-group"> <label class="control-label col-lg-3 required" for="custom_label"> <span class="label-tooltip" data-toggle="tooltip" title="{l s='Custom Label Text.'} {l s='Invalid characters:'} <>;=#{}"> {l s='Custom Label'} </span> </label> <div class="col-lg-5"> {include file="controllers/products/input_text_lang.tpl" languages=$languages input_class="{$class_input_ajax}{if !$product->id || Configuration::get('PS_FORCE_FRIENDLY_PRODUCT')}copy2friendlyUrl{/if} updateCurrentText" input_value=$custom_label input_name="custom_label" required=true } </div> </div> though it would be better to call the displayAdminProductsExtra hook and add it as a new tab. that way any updates prestashop make to their theme won't overwrite your changes. such as this: http://nemops.com/prestashop-products-new-tabs-fields/#.U9pZXGN418E Link to comment Share on other sites More sharing options...
El Patron Posted July 31, 2014 Share Posted July 31, 2014 if PrestaShop was compliant with their own developers guide, the product folder would use helpers, then you could easily add fields to any of the product tab's using a simple module folder. As it is now you will need to 'hack' core. Link to comment Share on other sites More sharing options...
PrabuSS Posted August 1, 2014 Author Share Posted August 1, 2014 Thanks for your suggestion nhelliwell. I have tried to implement this code but no luck even entered values are not inserted in ps_product table also. However thanks once again Link to comment Share on other sites More sharing options...
vekia Posted August 1, 2014 Share Posted August 1, 2014 can you show your modified file, please? Link to comment Share on other sites More sharing options...
PrabuSS Posted August 1, 2014 Author Share Posted August 1, 2014 Hello vekia Thanks for the quick reply MY actual requirement is i would like to change Condition drop down menu as a hands free text field in the PS 1.6 back office Please provide some advice for how can i modify this code in following .tpl file ADMIN_DIR/themes/default/template/controllers/products/informations.tpl line 262 <div class="form-group"> <label class="control-label col-lg-3" for="condition"> {include file="controllers/products/multishop/checkbox.tpl" field="condition" type="default"} {l s='Condition'} </label> <div class="col-lg-3"> <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> </div> </div> Link to comment Share on other sites More sharing options...
Recommended Posts