Jump to content

Back Office Editing


xardline

Recommended Posts

Hello, I have encountered such a problem. I can't change the "Add a new product" page, I managed to do what I needed once, but none of it worked, I had to go back to the original version. Please help me.

The bottom line is that adding a product is too complicated for the person for whom this site is made, and I would like to remove all unnecessary buttons and functions.

Leave only the addition of photos, quantity, regular price and price for 1kg of items, the choice of categories and description.
Presta version 8.1.0

At the bottom I attached a photo's of how it should look like and what is considered superfluous.
Thanks!
 

browser_hADKlensbJ.png

browser_HizZZkHBmy.png

Link to comment
Share on other sites

You cannot delete those tabs. Those fields are checked for when you submit the page.

So you have basically two options:

 - replace all the fields that you don't want with hidden fields. You can put those hidden fields on the first page and after that you can remove the tabs. This is likely to work but there might be some javascript interfering.

 - put some empty div over those tabs that you don't want to show. Z-index=1. They will still be there but you cannot see or reach them.

Link to comment
Share on other sites

12 hours ago, musicmaster said:

You cannot delete those tabs. Those fields are checked for when you submit the page.

So you have basically two options:

- replace all the fields that you don't want with hidden fields. You can put those hidden fields on the first page and after that you can remove the tabs. This is likely to work but there might be some javascript interfering.

Yes, I already prescribed hidden="" to all of them, and everything was fine, except that nothing worked.

 

12 hours ago, musicmaster said:

- put some empty div over those tabs that you don't want to show. Z-index=1. They will still be there but you cannot see or reach them.

How can I do this? Can you show an example? And where are the files that need to be changed?
 

 

11 hours ago, QuickUpdate.net said:

You have the option to hide those tabs with CSS if you can edit some files / code.

Yes, I have access to the files of the entire site. What do I need to do? In which files is this data stored on 8.1?

Link to comment
Share on other sites

Also, before hiding these buttons, by the way, I decided to just make the css code in this form:

button {
  opacity: 0;
  transition: 0.8s;
}
button:hover {
  opacity: 1;
}

And so, before hiding, I would like to transfer these items from the screenshot that I attached below to the main page for adding products, that is, as it was in the prestashop 1.6 version. I need to transfer the items Quantity, Price and Price per kg. Where can I find it and how can I transfer it so as not to break anything?

Now, when I add or remove something from the html.twig codes, nothing happens, in order for something to start happening, I have to delete the lines that synchronize step1-step6 in
the src/PrestaShopBundle/Form/Admin/Product/ folder.

You should just try to change something yourself on the product addition page so that you understand me and my problem)
This is very unclear and difficult, besides for me, as for a beginner in the field of programming! I just learned the essence of js, and then php and symfony attacked me!

explorer_DOy5YUlwky.png

Edited by xardline
add image (see edit history)
Link to comment
Share on other sites

You are complicating too much - you need to hide those elements so the remain with their default values.

Add the following: 

#product_details-tab-nav { display: none; }

#product_combinations-tab-nav { display: none; }

#product_shipping-tab-nav { display: none; }

#product_pricing-tab-nav { display: none; }

#product_seo-tab-nav { display: none; }

#product_options-tab-nav { display: none; }

in this file: /[ADMINFOLDER]/themes/new-theme/public/theme.css

 

Now the file is dynamically generated at some point (install?) - in case someone else knows when is the scss file processed to generate that file to knwo if this is a good fix or not.

Edited by QuickUpdate.net (see edit history)
Link to comment
Share on other sites

1 hour ago, QuickUpdate.net said:

You are complicating too much - you need to hide those elements so the remain with their default values.

Add the following: 

#product_details-tab-nav { display: none; }

#product_combinations-tab-nav { display: none; }

#product_shipping-tab-nav { display: none; }

#product_pricing-tab-nav { display: none; }

#product_seo-tab-nav { display: none; }

#product_options-tab-nav { display: none; }

in this file: /[ADMINFOLDER]/themes/new-theme/public/theme.css

 

Now the file is dynamically generated at some point (install?) - in case someone else knows when is the scss file processed to generate that file to knwo if this is a good fix or not.

Yes, hiding works fine, but how do I move the line of price and quantity of goods to the main page?

browser_zrXSiP34NU.png

Link to comment
Share on other sites

2 minutes ago, QuickUpdate.net said:

Thats a different change altogether you need to edit the templates and even with that it might not work properly, best to leave the tabs you need and hide the elements on the respective tabs not move them.

So I can't do it like this?

browser_lsTgamokab.png

Link to comment
Share on other sites

1 minute ago, QuickUpdate.net said:

@xardline You are asking irrelevant questions - i mentioned that if you will do it, it *might* not work properly or need multiple other changes related to how the data in those forms is processed; it's not as trivial as hiding those tabs.

I understand you, but how to return the hidden tab to the reverse option?

Link to comment
Share on other sites

9 minutes ago, QuickUpdate.net said:

@xardline You are asking irrelevant questions - i mentioned that if you will do it, it *might* not work properly or need multiple other changes related to how the data in those forms is processed; it's not as trivial as hiding those tabs.

Oh, bro! I just solved all the problems!

browser_kZqdPYP9hF.png

browser_h6xCly1lW0.png

Link to comment
Share on other sites

"Oh, bro! I just solved all the problems!" - glad you found a solution so it's basically the "normal" product page not the experimental one

"Can I also hide these blocks via css?" - Yes you can hide them - get the element id and add the css rule to the file i mentioned

Edited by QuickUpdate.net (see edit history)
  • Thanks 1
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...