Requirement
During the registration process, USA-based customers need to update the resale certificate. The resale certificate option needs to be shown on my account page. The resale certificate process should be manageable by a checkbox field in the customer record. The first page of the certificate only needs to be updated.
Our Solution
For the implementation of the resale certificate, we need three fields
- Resale Certificate Uploaded – Checkbox -> To check whether the file uploaded or not?.
- Resale Certificate – Checkbox -> If enabled, the resale option should be available for existing customers.
- Resale Certificate File – File field -> The resale certificate file should be added in the field.
Here we can use the same field that was used for the Balaji site.
A custom HTML form will be created with all the fields in the form. A canvas area will be added where the customer adds the address. All the fields will be mandatory.
During new customer registration,
- When a new customer registered on the website, if the selected country is the United States, a reseller certificate button will be added and on clicking the button a pop-up window will appear where the custom form will be shown.
- The customer can enter the details in the form(all fields will be mandatory).The user cannot submit the form without entering values in all the fields. On submitting the pop-up window closed.
- Once the user registered, the form will be rendered and a PDF file will be created. The file will be saved in the file cabinet and will be updated in a field named Resale Certificate File in customer record on registration. Once the certificate is uploaded, the checkbox fields Resale Certificate Uploaded and Resale Certificate will be enabled.
- In the my account page, a new tab will be created for resale certificates. If the form is uploaded it will be shown there, else there will be a button for uploading the certificate by filling the form.
After Login for an existing customer,
- When a customer login: if the checkbox field named “Resale Certificate” is checked, the certificate is not uploaded and if the country is US, a pop-up will be shown for the resale certificate. In the pop-up there will be 2 buttons named Skip/cancel and Update certificate. On the update certificate button click, it will navigate to the my account resale certificate management section.
- In My Account: There is an option for downloading the certificate if the customer is already registered with or uploading the certificate. The option is available if the certificate is uploaded and if the country is US.
For achieving the above solution we are planning to create an extension for the Login page and My Account section.
Assumptions
- The solution will be implemented in the domain sandbox environment