Management of custom fields in Prestashop
Many of you are adding complementary information data, like an HTML block, to the standard PrestaShop product pages and would like to edit its values directly from Merlin Backoffice
Display an HTML block or additional text in PrestaShop
For this you often use an external addon, or a custom made module which will for example allow to add an additional HTML block to the location of your choice, with a different content for each product.
Most of the time, this type of module adds a new table to the database, to store the contents of the field.
In other cases, it just adds a new topic to an already existing PrestaShop table, such as the "product" or "product_shop" table.
The question that you often ask us is: is it possible to display the contents of this type of
non-standard fields in PrestaPricing or Merlin Backoffice ®, to see and modify its content for each product ?
The answer is yes, of course, thanks to the "Custom" columns.
For this tutorial, we will take a very concrete case, with the use of a colleague's module: "Products Stock Threshold". This addon does not add a field to the display but a numeric parameter to each product. In this case a quantity threshold, which triggers an alert when it is reached. Once installed, this addon adds a new tab entry in the product listing back office to enter this "Stock threshold":

The principle remains the same, this module has added its own table in the database (pss_products_stock_threshold), and saves the values in a field called "quantity". This information is rarely documented, but most of the time, the name of the added table or tables refers to the name of the module. It is therefore quite easy, in PHPMyAdmin, to find this information. If you do not find this info, simply ask the developer of the module: "What are the names of the table and the field containing the values of the custom field?".
For the module used in this tutorial, here is a cature of PHPMyAdmln, showing the structure of the table found in the database, after its installation:

How to display this non-standard topic in Merlin Backoffice?
- Place yourself in the "Products" view and first open the column configurator by clicking on the "Columns" button in the title of the main window.
- Place yourself in the "Products" sub-tab of the table configuration window and right-click in the list on the left, in order to open the custom columns configurator:

- You have just two fields to fill, in the columns indicated by arrows in the capture below, the name of the table (1) and the name of the non-standard field to display (2).
Warning, the name of the table must be entered without its prefix (here I removed the prefix pss_):

- Then drag and drop the line "Perso 1" from the left table to the right table in the position (order) of your choice (1) :

You can also (2), give the title you want to your column.
Change of title given to the column:

(3) validate.
- The product display automatically refreshes, adding your customized column and displaying the value it contains for each product:

From there, it is possible to:
- View the values
- Edit values, cell by cell
- Filter on this column
BIG NEW 2023 OF MERLIN BACKOFFICE ® FLEX, starting with the PREMIUM formula: all mass management functions, such as copy and paste, MagicEdit or MagicFormula now also work on personal columns !
See also: from version 1.6 of Merlin, it is possible to import csv or xls in custom fields.
Category's other articles Mass management of PrestaShop products
-
How to mass-produce products in PrestaShop
How to
Creating products in PrestaShop one by one is a thankless and time-consuming task. Here's how to make your life a lot easier
-
How to apply a change to all products without displaying them?
How to
This very simple and very fast method allows you to modify all products without displaying them, using Sitolog Merlin Backoffice ™ PrestaShop addon
-
Three methods for enabling and disabling products
How to
Discover three ways to very quickly enable or disable a selection or all products by category, with the famous PrestaCategories PrestaShop addon
-
Mass edition of products on Prestashop to quickly associate the same value to a large number of products
How to
Here are pictures of how to make quick copy and paste in PrestaShop, or mass edition, to fill with the same value any property in a large number of products, with the MerlinBackoffice module
-
How to link an orphan product to a category?
How to
The solution using PrestaCategories or Merlin Backoffice addons to bulk repair all the orphan products of your PrestaShop in one click (assign a main category to all products without default category)
-
Prestashop accessories and related products module
Video
How to
Increase your sales by offering compatible accessories. Quickly create cross-associations between your products thanks to the Merlin Backoffice module, and its management of associated products | SITOLOG
-
Add a carrier and associate it with all PrestaShop products
Video
How to
Did you know that, with Merlin Backoffice, you can associate a new carrier with all or a selection of your products in just one click? This is an enormous time-saver compared with doing it one file at a time in PrestaShop
-
PrestaShop and barcodes
Guide
Finally, a complete barcode management solution for your PrestaShop store.
-
How do I delete products from a csv that lists IDs?
Trick
We'll show you how to delete a product list from a CSV or Excel file in your PrestaShop store