DEV Community

Cover image for Social links for customers in Prestashop
Valentine
Valentine

Posted on

Social links for customers in Prestashop

PrestaShop 1.7 Module

This is a module for PrestaShop, an open-source eCommerce platform, that adds extra fields to the customer registration and account pages. The module adds fields for social media account information and preferred communication method.

The module is licensed under the Academic Free License (AFL 3.0) and was developed by vallka. The module's version is 1.0.0, and it is compatible with PrestaShop 1.7 and above.

The module installs a new database table named extra_customer_fields to store the additional information. The module also registers several hooks to integrate with the customer registration and account pages. The additionalCustomerFormFields hook adds the extra fields to the customer registration form. The validateCustomerFormFields hook validates the extra fields before saving them to the database. The actionObjectCustomerUpdateAfter and actionObjectCustomerAddAfter hooks update and add the extra fields to the database when a customer is updated or added. Finally, the actionCustomerFormBuilderModifier hook modifies the customer account form to include the extra fields.

The module has two methods for reading and writing the extra field values: readModuleValues and writeModuleValues. The readModuleValues method reads the extra field values from the database for a given customer ID, and the writeModuleValues method writes the extra field values to the database for a given customer ID.

Here is the link to GitHub - feel free to use!

Top comments (0)