xardline Posted October 25, 2023 Share Posted October 25, 2023 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! Link to comment Share on other sites More sharing options...
musicmaster Posted October 25, 2023 Share Posted October 25, 2023 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 More sharing options...
QuickUpdate.net Posted October 25, 2023 Share Posted October 25, 2023 You have the option to hide those tabs with CSS if you can edit some files / code. Link to comment Share on other sites More sharing options...
xardline Posted October 26, 2023 Author Share Posted October 26, 2023 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 More sharing options...
xardline Posted October 26, 2023 Author Share Posted October 26, 2023 I understand that it is stored here, but when you change these files, everything breaks Link to comment Share on other sites More sharing options...
xardline Posted October 26, 2023 Author Share Posted October 26, 2023 (edited) 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! Edited October 26, 2023 by xardline add image (see edit history) Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted October 26, 2023 Share Posted October 26, 2023 (edited) 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 October 26, 2023 by QuickUpdate.net (see edit history) Link to comment Share on other sites More sharing options...
xardline Posted October 26, 2023 Author Share Posted October 26, 2023 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? Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted October 26, 2023 Share Posted October 26, 2023 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. Link to comment Share on other sites More sharing options...
xardline Posted October 26, 2023 Author Share Posted October 26, 2023 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? Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted October 26, 2023 Share Posted October 26, 2023 @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. 1 Link to comment Share on other sites More sharing options...
xardline Posted October 26, 2023 Author Share Posted October 26, 2023 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 More sharing options...
xardline Posted October 26, 2023 Author Share Posted October 26, 2023 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! Link to comment Share on other sites More sharing options...
xardline Posted October 26, 2023 Author Share Posted October 26, 2023 (edited) Can I also hide these blocks via css? If so, you can call a moderator to close the topic! My problem is solved by the method of poke and help QuickUpdate.net ! Edited October 26, 2023 by xardline 1 (see edit history) Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted October 26, 2023 Share Posted October 26, 2023 (edited) "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 October 26, 2023 by QuickUpdate.net (see edit history) 1 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