Customer Type OPC
Complete documentation to install, configure and use the Customer Type OPC module in your PrestaShop store.
What is Customer Type OPC?
Customer Type OPC lets your customers state what type of customer they are (for example, individual, company or freelancer) when they register and during checkout. Depending on the type chosen, the form shows or hides fields and marks them as required or optional, so each customer only fills in what applies to them. Each type can also be linked to a PrestaShop customer group, which the customer joins automatically.
The module is an extension of One Page Checkout PS: it works on that module's registration fields and requires it to be installed and active. It works with its four checkout layouts: vertical, steps, three columns and Shopify.
Main Features
Customizable customer types
Create the types your store needs, enable or disable them and sort them in the list.
Form fields by type
Decide, for each type, which One Page Checkout PS registration fields are shown and which are required.
Automatic group assignment
Each type can have a PrestaShop customer group, which is assigned to the customer when they choose that type.
Selection at registration and checkout
The type selector appears on the "Create an account" page and in the checkout registration form, and customers who do not have a type yet are asked to choose one.
System Requirements
| Requirement |
Minimum |
Recommended |
| PrestaShop |
1.7.6 |
8.x or 9.x |
| PHP |
7.2.5 |
The latest one supported by your PrestaShop version |
| One Page Checkout PS |
5.0.0, installed and active |
Latest available version |
Installation
There are two methods to install the module in your PrestaShop store, depending on your server characteristics.
Before installing: Customer Type OPC requires One Page Checkout PS 5.0.0 or later, installed and active. If it is not, when you open the module configuration you will see a dependency notice instead of the panel.
Method 1: Installation from Back Office
1
Access the Back Office
Log in to your PrestaShop store administration panel.
2
Navigate to Modules
Go to Modules → Module Manager in the side menu.
3
Upload the module
Click "Upload a module" and select the downloaded ZIP file.
4
Install and activate
Once uploaded, the module will install automatically. Click "Configure" to get started.
Method 2: FTP Installation
Use this method if the ZIP file is too large and your server doesn't allow uploading it from the Back Office due to upload size limitations.
1
Extract the ZIP file
Extract the contents of the ZIP file on your local computer.
2
Connect via FTP
Use an FTP client (like FileZilla) to connect to your server.
3
Upload the module folder
Upload the module folder to /modules/ in your PrestaShop installation.
4
Install from Back Office
Go to Modules → Module Manager, search for the module and click "Install".
Possible Installation Issues
Override Conflicts: During module installation or activation, issues related to override files may arise. This happens when another module has already modified the same PrestaShop core files.
If you experience override errors when installing or activating the module, don't try to resolve it yourself if you don't have technical experience. Contact our support team to receive personalized help and resolve the conflict safely.
Contact Support
General
This section groups the settings that affect the whole module: debug mode, to test it before your customers see it, and the way the customer type selector is displayed. Access it through Modules → Customer Type OPC → Configure.
Debug mode
When this option is enabled, the module only works for the IP addresses you enter in the IP field. All other visitors see the store as if the module were not installed, so you can test the customer types and their fields without affecting your customers. Remember to disable it when you are done: while it is enabled, your customers will not see the module.
IP
Enter here the IP addresses that will be able to see the module while debug mode is enabled. You can add several separated by commas, and the button next to the field adds the IP you are connected from.
Note: It is recommended to enable this option to test the module in your store before enabling it for customers.
Field type for customer types
Choose how the customer type selector is displayed in the registration form and in the window that asks customers who do not have a type yet to choose one: as a Drop-down list or as Circular buttons, with one visible option for each type.
Customer types
In this section you define your store's customer types and decide which registration form fields apply to each one. It has two parts: the list of types and the configuration of their fields.
List of client types
Here you see all the store's customer types in a table with their position, description, internal name, label, assigned group and whether they are active or the default one. From the table you can Add a new type, Refresh the list and, on each row, Edit or Delete the type.
With the Move up and Move down arrows you change the order of the types. That order is the one used at registration, at checkout and in the customer page of the back office. The order is saved per store, and new types are always added at the end of the list. Each time you move a type, a notice confirms that the change was saved, or warns you if it could not be saved.
When you click Add or Edit, the customer type form opens, with these options:
Description
This is the name of the type as your customers will see it in the selector, for example "Individual" or "Company". Write it in each store language: the Language selector next to it changes the language you are editing.
Note: This field is required for all languages available in the store.
Internal name
A technical name to identify the type within the module. Your customers do not see it, so you can use whichever is most convenient for you.
Label
An optional text, also per language, that appears as a comment next to the customer type selector in the registration form. Only the label of the type marked as Default is shown.
Group to assign
The PrestaShop customer group the customer will join when they choose this type. That group also becomes their default group, and if the customer changes type, the group of the previous type is removed. Any other groups the customer already has are kept. You can leave it empty if you do not want the type to change the customer's group.
If you do not see this field: the list only offers the groups you have created yourself. The three that come with PrestaShop (Visitor, Guest and Customer) are not listed, so in a store with no groups of its own the field is not shown. First create the group in Shop Parameters, in the Groups section of the customer settings, and then open the customer type again.
Important: Changing the customer's group can change the prices, discounts and categories they see in the store, depending on how your groups are configured in PrestaShop.
Active
When it is disabled, the type is no longer offered to customers at registration and at checkout.
Default
Marks the type that is selected by default for customers who do not have one yet. There can only be one default type per store: when you mark one, the previous one stops being the default.
OPC record fields
Here you decide, for each customer type, which One Page Checkout PS form fields are shown and which are required. For example, you can ask for the company name only from those who choose the Company type and hide it from individuals.
First choose the type in Select Client Type: and the table with all the One Page Checkout PS registration fields will appear, each with its name and description. The row colors show which part of the form each field belongs to, according to the Categories legend: Client, Delivery address, Invoice address, Shipping and Payment. Each change is saved instantly, without clicking any button.
Note: You must create at least one customer type to use this tab.
Note: If the One Page Checkout PS "Request invoice" option is enabled, the fields controlled by that option (company, VAT number, DNI, SDI code and PEC) are managed by One Page Checkout PS in the form where it appears, and the per-customer-type configuration does not apply to them.
Required
Tick this box to make the field required for customers of this type. If you leave it unticked, they can leave it empty.
Active
Tick this box to show the field to customers of this type. If you untick it, the field is hidden in their form.
Note: When the address country requires the DNI or the postcode, those fields are shown and are required even if you have hidden them or left them optional for the customer type.
In the store and in the back office
Besides registration and checkout, the customer type appears in two more places: in a window that asks for it from anyone who does not have one yet, and in the customer screens of the back office. Neither of them has options of its own in the module panel.
Window for customers without a type
Customers who already had an account before the module was installed, and guests, have no customer type. When one of them opens their personal details, their addresses or the checkout, a window titled Tell us a little about you opens so they can choose their type.
The window does not close until they choose one: it cannot be dismissed by clicking outside it or with the Escape key. When they click Continue, the type is saved, the customer joins that type's group if it has one, and the page reloads to show the fields that apply to them. The selector is shown as a drop-down list or as buttons, depending on what you chose in Field type for customer types.
The customer type in the back office
In Customers you will see each customer's type in three places:
- In the customer list, in a Customer type column.
- On each customer's page, with an Associated customer type notice above their personal information.
- In the form to create or edit a customer, with a required Customer type field. It is shown as a drop-down list or as buttons, the same as in the store. When you save, the customer moves to the chosen type and to its group, if it has one.
Note: The form field only offers active types. If a customer has no type, the field appears empty with the text Select a customer type, and no notice is shown on their page.
Translation
From here you can change any text of the module in each language of your store, to adapt it to the way you talk to your customers.
Select a language
Choose the language you want to edit and all the module texts will be loaded, grouped by file. On each row you will see the original text and, next to it, the field where you write its translation.
Note: Some expressions use the %s syntax. That symbol is replaced by a value when the text is displayed, so you must keep it in the translation.
Save
Saves the changes you have made to the selected language.
Save and Download
Saves the changes and also downloads the translation file for that language, in case you want to keep a copy.
Share with Us
Sends your translations of the selected language to the PresTeamShop team, so they can be included in future versions of the module.
Expand All
Opens all the translation files at once, so you can see all the texts at the same time.
Collapse All
Closes all the translation files and leaves the list collapsed.
Code Editors
Here you can add your own CSS and JavaScript to adjust the look or behavior of the module in the store, without touching the files on the server. There is an editor for each file type, and what you write is loaded on the store pages. Click Save to apply the changes.
Caution: An error in the code you add can affect how the store looks or works. Test it first with debug mode enabled.
Backups
Backups save the module configuration and its data: the customer types, their translations and the field configuration of each type. They let you go back to a previous state if something does not turn out as expected, or move the configuration to another store.
Generate new backup
Instantly creates a copy with the current state of the module. It is a good idea to make one before important changes, such as deleting customer types or rearranging their fields.
Upload backup
If you have a previously downloaded backup, for example from another store, upload it here so you can restore it. Choose the file in Select a .zip file and click Upload.
Note: Only .zip files of up to 5 MB are accepted.
Backups available
Shows all the module backups with their date, file name, size and status (Created, Uploaded or Restored). You can filter them with Search by date and click Refresh list to see the latest ones. Each backup has these actions:
Restore Backup
Returns the module to the state saved in that backup.
Caution: When you restore this backup, all current information related to the module will be deleted and replaced with the data contained in the selected backup.
Download Backup
Downloads the backup to your computer as a .zip file, to keep it outside the store or upload it to another one.
Delete Backup
Removes the backup from the list. This action cannot be undone.
Support
If you need additional help or have any questions about the module, we're here to help.