Jump to content

[PS 1.7] BackOffice edit and change Product page


NicolasIT
 Share

Recommended Posts

Ehy there,

We're talking about Prestashop 1.7.2.1

I was able to edit Order table adding or removing columns i didn't need [FE removed new customer and added email] but i'm experiencing some problems on product page maybe becouse it's symphony and i still don't feel confortable with it.

I'd like to remove

  • ID field
  • the "pen" you can see on the image i attached [there's no difference by clicking on the "pen" or the name of the product if i remove the pen i save space]post-1428578-0-64232300-1504614289_thumb.png

and i'd like to add

  • EAN field
  • mixing name and description search on "name" field so i could search the name or some words of description in that field to find faster some products

How can i achieve this?

i guess last bullet point is not possible but i asked it anyway

thanks,

NicholasIT

Edited by NicolasIT (see edit history)

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Hello,

 

inded there is a way, but you need to edit PS core... (if anyone knows how to override Symfony bundles...)

 

Files involved:

  • /src/PrestaShopBundle/Resources/views/Admin/Catalog/Product/catalog.html.twig
  • /src/PrestaShopBundle/Resources/views/Admin/Catalog/Product/list.html.twig

However, I'm in the same case of you, I don't find where to display EAN13... Since I have any information, I'll update this post.

 

Regards,

Share this post


Link to post
Share on other sites

  • 1 month later...

You can also use standard override behavior using:

  • /override/controllers/admin/AdminProductsController.php

 

then you need to update admin URL from legacy back-office/index.php/product/catalog.... to current /back-office/index.php?controller=AdminProducts...; to do so just override class Link.php in:

  • /override/classes/Link.php

 

You can use attached files to recreate standard view. Just place them in corresponding folders. 

 

 

 

 

AdminProductsController.php

 

Link.php

Edited by edogusma (see edit history)

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Hello,

I was facing the same problem  (  I want to add a manufacturer column in product list )
I have found a solution but as AmigaINC said it is necessary to edit some prestashop core file.
You can find the tutorial about this (in french ) : https://www.h-hennes.fr/blog/2017/11/15/prestashop-1-7-ajouter-des-champs-dans-le-listing-produit-admin/

Regards,
Hervé

Share this post


Link to post
Share on other sites

On 17/11/2017 at 11:03 AM, edogusma said:

Up to you, Hervé, but editing core files is always a risk...

 


I totaly agree with you on this point ;-)
But in the case you want to use the new infrastructure page there is no other choice.. for now.
I've seen that it will be corrected in the next PS release : https://github.com/PrestaShop/PrestaShop/pull/8342

Share this post


Link to post
Share on other sites

  • 4 months later...
  • 1 year later...

Hello everyone,

I'm trying to edit the file:

form_categories.html.twig

in the folder:
yoursite / src / PrestaShopBundle / Resources / views / Admin / Product / ProductPage / Forms /

Since I would like to hide some code from some employees, I set an if using the context:

{% if (int)Context::getContext()->employee->id_profile != 6 %}

the problem is that the vairable context does not recognize me.

Unexpected token "name" of value "Context" ("end of statement block" expected).

Could anyone help me?

Thanks to those who will respond.

Edited by shon (see edit history)

Share this post


Link to post
Share on other sites

  • 1 year later...
On 9/16/2017 at 10:37 AM, AmigaINC said:

Hello,

 

inded there is a way, but you need to edit PS core... (if anyone knows how to override Symfony bundles...)

 

Files involved:

  • /src/PrestaShopBundle/Resources/views/Admin/Catalog/Product/catalog.html.twig
  • /src/PrestaShopBundle/Resources/views/Admin/Catalog/Product/list.html.twig

However, I'm in the same case of you, I don't find where to display EAN13... Since I have any information, I'll update this post.

 

Regards,

Where is the search query located?

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More