Jump to content

Edit the product creation date


Recommended Posts

  • 4 weeks later...

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

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

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

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

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

Stop it, Scully, Rogue0104 is right. There is no such directory in release 1.7.  :D

 

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. 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Stop it, Scully, Rogue0104 is right. There is no such directory in release 1.7.  :D

 

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

  • 1 month later...

:D 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:

  1. /src/PrestaShopBundle/Resources/views/Admin/Product/form.html.twig
  2. /src/PrestaShopBundle/Model/Product/AdminModelAdapter.php: and finally
  3. /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! :rolleyes:

 

Link to comment
Share on other sites

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

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

  • 10 months later...
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...