D
D
DeniSidorenko2020-04-23 06:19:36
opencart
DeniSidorenko, 2020-04-23 06:19:36

How to put 2 types of accounts on Opencart?

Good afternoon, there is a task of registering an account for opencart. The only problem is that there will be 2 types of accounts, for individuals and legal entities. persons. When registering, the user chooses which type to belong to. Depending on the choice when placing an order and in your personal account, the fields will differ. The question is how to make distinctions by status?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danil, 2020-04-23
@rek888

save the data from the registration form field, for example, input type=checkbox name=ur, to the opencart database, if you don’t really want to mess with the model, use the existing fields like tax, shipping, etc.
in the template, which should be different, use data validation in the selected field

....<?php if($this->ur) {?> здесть html-ка <?} else {?> здесть для физ лиц <?}

either fix the controller at the logic stage and create a new view for legal entities

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question