Want to remove/hide certain unnecesaary data fields?

In this board, we will periodically list various tips and tricks we find that may help in your use of PrestaShop. This will also include tips on the use of Agile modules. If you have a great tip, fix, or workaround for a PrestaShop feature, feel free to post it here...

Want to remove/hide certain unnecesaary data fields?

Postby Terry » Sun Mar 10, 2013 9:04 pm

There are times when some customers ask if it's possible to remove certain data fields they may not be using in their store, especially on the product pages. Rather than have them displayed and empty, it would be better (and less confusing) not to have them displayed at all.

In PrestaShop it's best not to completely remove a field from the core code, because PrestaShop and many addon modules make use of the ID feature of HTML tags to manipulate data or the GUI, and if you simply remove the field(s) you could 'break' the system.

A better way is to leave the fields in the code, but hide them so they're not displayed.

You can easily do this by editing the appropriate file and setting the style property of the HTML tag for the field in question to not display - i.e. style="display:none;".

This leaves the field and all associated code in place, but stops the field from being displayed on screen.

Note: Be careful when using this procedure for manadatory fields. Not displaying a field that requires mandatory data entry can cause issues, such as not being able to Save a record.
Terry
 
Posts: 125
Joined: Mon Oct 22, 2012 12:49 am

Return to Tips and Tricks for PrestaShop and Agile Modules

Who is online

Users browsing this forum: No registered users and 2 guests