NemoPS Posted August 14, 2017 Share Posted August 14, 2017 Hey everyone! I If you ever wanted a quick way to edit the product creation date, here is an easy tut to add that specific field, with datepicker, into the back officehttp://nemops.com/eidt-product-creation-date-thirtybees-prestashop/#.WZF_elEjGUkFabio Link to comment Share on other sites More sharing options...
rogue0104 Posted September 6, 2017 Share Posted September 6, 2017 hello, i want to apply.... using 1.6.1.13 presta version.../themes/default/template/controllers , everythings there but products directory....its not there....any options? Link to comment Share on other sites More sharing options...
Scully Posted September 6, 2017 Share Posted September 6, 2017 It is there. BackofficePath/themes/default/template/controllers/products If it's not there, you couln't edit products in your backoffice. Link to comment Share on other sites More sharing options...
rogue0104 Posted September 6, 2017 Share Posted September 6, 2017 It is there. If it's not there, you couln't edit products in your backoffice. path > admin855b5hfbf/themes/default/template/controllers its not there....i even used search option for whole website ...nothing found and i fully understand "If it's not there, you couln't edit products in your backoffice." thats why its also strange to me... Link to comment Share on other sites More sharing options...
Scully Posted September 6, 2017 Share Posted September 6, 2017 post your directory content from /themes/default/template/controllers with full details (ls -l) if possible. Link to comment Share on other sites More sharing options...
NemoPS Posted September 7, 2017 Author Share Posted September 7, 2017 Can you access via ftp and see, folder by folder, which one is not there first? Link to comment Share on other sites More sharing options...
rogue0104 Posted September 7, 2017 Share Posted September 7, 2017 here it is Link to comment Share on other sites More sharing options...
Scully Posted September 7, 2017 Share Posted September 7, 2017 Your missing the directory I would say. What about your servers error log. And confirm: Are you able to view and edit products from your backoffice? Yes nor no? Link to comment Share on other sites More sharing options...
rogue0104 Posted September 7, 2017 Share Posted September 7, 2017 Your missing the directory I would say. What about your servers error log. And confirm: Are you able to view and edit products from your backoffice? Yes nor no? yep i can add products see > korektor . org thats why its strange to me as well Link to comment Share on other sites More sharing options...
Scully Posted September 7, 2017 Share Posted September 7, 2017 Do you have SSH access to perform a search directly from the console? Link to comment Share on other sites More sharing options...
NemoPS Posted September 8, 2017 Author Share Posted September 8, 2017 Are you absolutely sure that's the site's folder path? It can't really work without that folder, try putting a file in the root and access it via web, see if it's loaded Link to comment Share on other sites More sharing options...
Scully Posted September 8, 2017 Share Posted September 8, 2017 There are probably duplicate folders for the backend by some mistake and you are in the wrong folder? I still remain with my statement: prestashop backend products does not work wihout this folder. Btw - any feedback by the questioner would be appreciated. Link to comment Share on other sites More sharing options...
rogue0104 Posted September 11, 2017 Share Posted September 11, 2017 Are you absolutely sure that's the site's folder path? It can't really work without that folder, try putting a file in the root and access it via web, see if it's loaded ..yes i am absolutly sure..and im not noob as to some minor coding and editing so i know what im talking about and if i say its not there..its not there for sure..believe me or not. even after new fresh installation its not there at all... Link to comment Share on other sites More sharing options...
rogue0104 Posted September 11, 2017 Share Posted September 11, 2017 There are probably duplicate folders for the backend by some mistake and you are in the wrong folder? I still remain with my statement: prestashop backend products does not work wihout this folder. Btw - any feedback by the questioner would be appreciated. i know it cant work without that folder..im not so .... ive searched whole website directory for "products" 0 results found... Link to comment Share on other sites More sharing options...
Scully Posted September 11, 2017 Share Posted September 11, 2017 When I search for products*, I find the following files: ./StoreAdmin/themes/default/template/controllers/products./docs/csv_import/products_import.csv./img/admin/products.gif./js/admin/products.js./themes/default-bootstrap/sass/modules/productscategory./themes/default-bootstrap/sass/modules/productscategory/css/productscategory.scss./themes/default-bootstrap/products-comparison.tpl./themes/default-bootstrap/js/products-comparison.js./themes/default-bootstrap/js/modules/productscategory./themes/default-bootstrap/js/modules/productscategory/js/productscategory.js./themes/default-bootstrap/js/modules/productcomments/js/products-comparison.js./themes/default-bootstrap/css/modules/productscategory./themes/default-bootstrap/css/modules/productscategory/css/productscategory.css./themes/default-bootstrap/modules/productscategory./themes/default-bootstrap/modules/productscategory/productscategory.tpl./themes/default-bootstrap/modules/productcomments/products-comparison.tpl./modules/productscategory./modules/productscategory/views/templates/hook/productscategory.tpl./modules/productscategory/js/productscategory.js./modules/productscategory/productscategory.php./modules/productscategory/css/productscategory.css I would say we close at this point. The initial question here was about product creation date and not missing folder or missing files. Link to comment Share on other sites More sharing options...
eleazar Posted September 11, 2017 Share Posted September 11, 2017 Stop it, Scully, Rogue0104 is right. There is no such directory in release 1.7. If you want to add the field date_add to the product information page in BO, you should know that there's a different path and file to change now: src/PrestaShopBundle/Form/Admin/Product/ProductInformation.php Search for public function buildForm - and don't forget that 1.7 uses a different syntax. 1 Link to comment Share on other sites More sharing options...
Scully Posted September 11, 2017 Share Posted September 11, 2017 (edited) @elazar, you are right for V 1.7. But I quote post #2 from rogue0104: hello, i want to apply.... using 1.6.1.13 presta version So rogue1004 - might be up to you to explain this statement if elazar is right with the guess of V 1.7. Edited September 11, 2017 by Scully (see edit history) Link to comment Share on other sites More sharing options...
eleazar Posted September 12, 2017 Share Posted September 12, 2017 @Scully I'm aware of this, Scully. But the image he uploaded seems to show a payment-preferences directory. This did not exist in 1.6.1.13 - but was added to 1.7.x. And you won't find a subdirectory /themes/default/public in 1.6.1.x either. Link to comment Share on other sites More sharing options...
Scully Posted September 13, 2017 Share Posted September 13, 2017 No more feedback - rogue0104 ? Link to comment Share on other sites More sharing options...
rogue0104 Posted September 22, 2017 Share Posted September 22, 2017 Stop it, Scully, Rogue0104 is right. There is no such directory in release 1.7. If you want to add the field date_add to the product information page in BO, you should know that there's a different path and file to change now: src/PrestaShopBundle/Form/Admin/Product/ProductInformation.php Search for public function buildForm - and don't forget that 1.7 uses a different syntax. its 1.7.2.2 my mistake was searching in wrong dir...sorry for confusion got it now... Link to comment Share on other sites More sharing options...
CdF-grafica Posted November 13, 2017 Share Posted November 13, 2017 In Prestashop 1.7 I found the file "productInformation.php".Do I have to enter the same code?And where?Thank you Link to comment Share on other sites More sharing options...
eleazar Posted November 13, 2017 Share Posted November 13, 2017 Welcome to PrestaShop 1.7! Forget quick changes like in former releases when you use 1.7. Everything is much more complicated now. You need to change at least 3 files (preferably as overrides) to make this work - with a different code of course: /src/PrestaShopBundle/Resources/views/Admin/Product/form.html.twig /src/PrestaShopBundle/Model/Product/AdminModelAdapter.php: and finally /src/PrestaShopBundle/Form/Admin/Product/productInformation.php Here's a short tutorial: https://stackoverflow.com/questions/43675696/add-field-in-product-prestashop-1-7 Or stick to 1.6 and be happy! Link to comment Share on other sites More sharing options...
CdF-grafica Posted November 14, 2017 Share Posted November 14, 2017 Many thanks for the answer. Actually, it's not easy I would like to be able to change the product insertion date (date_add). Thanks anyway! Link to comment Share on other sites More sharing options...
eleazar Posted November 14, 2017 Share Posted November 14, 2017 I am aware that you wanted to provide the field in order to change it. I just showed you how to add a certain field in 1.7. It's a bit easier than in the tutorial because the field date_add is already provided as public in the Product.php. But it is much easier in PrestaShop 1.6. Here you just need to insert to <admindir>/themes/default/template/controllers/products/informations.tpl the following code after line 173: <div class="form-group"> <label class="control-label col-lg-3" for="date_add"> <span class="label-tooltip" data-toggle="tooltip" title="{l s='Date and time product was inserted'}"> {$bullet_common_field} {l s='date_add'} </span> </label> <div class="col-lg-2"> <input type="text" id="date_add" name="date_add" value="{$product->date_add|escape:'html':'UTF-8'}" /> </div> </div> And it works like a charm. Link to comment Share on other sites More sharing options...
CdF-grafica Posted November 14, 2017 Share Posted November 14, 2017 I will try following the directions (this ecommerce is with Prestashop 1.7).But the Product.php file is not in the path indicated (Override / classes / Product.php)Thanks again! Link to comment Share on other sites More sharing options...
eleazar Posted November 14, 2017 Share Posted November 14, 2017 No, as it's a class you can find the original file in the /classes directory. It seems that you have few experience with code changes. You should first try to make yourself familiar with this shop systems's core, and with overrides in particular. And btw ... what directions do you mean? Didn't you read the myriads of warnings to currently avoid 1.7 for live shops? Link to comment Share on other sites More sharing options...
CdF-grafica Posted November 14, 2017 Share Posted November 14, 2017 Yes, Prestashop I know him recently (I used more csm). The path I was referring to is the one in your "link" https://stackoverflow.com/questions/43675696/add-field-in-product-prestashop-1-7 I understand it's an "Override" but I wanted to find the "Product.php" file. Ecommerce is still being tested ... Thank you Link to comment Share on other sites More sharing options...
Jason Wong Posted October 11, 2018 Share Posted October 11, 2018 On 14/11/2017 at 7:45 PM, eleazar said: I am aware that you wanted to provide the field in order to change it. I just showed you how to add a certain field in 1.7. It's a bit easier than in the tutorial because the field date_add is already provided as public in the Product.php. But it is much easier in PrestaShop 1.6. Here you just need to insert to <admindir>/themes/default/template/controllers/products/informations.tpl the following code after line 173: <div class="form-group"> <label class="control-label col-lg-3" for="date_add"> <span class="label-tooltip" data-toggle="tooltip" title="{l s='Date and time product was inserted'}"> {$bullet_common_field} {l s='date_add'} </span> </label> <div class="col-lg-2"> <input type="text" id="date_add" name="date_add" value="{$product->date_add|escape:'html':'UTF-8'}" /> </div> </div> And it works like a charm. I've tried your solution in PS 1.6.1.6, and this new field doesn't appear above the Name field. Is there anything amiss? Please advise. Thank you. 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