Minishop2 and Office: additional fields (gender, building, fullname)
Dear MODX Community,
I some questions about using fields in minishop2 with the Extra «Office».
1. user field «gender»
I added a select field for the gender of a customer. I want to use it for the salutation (Mr. / Ms.).
It works within the Office form chunk (tpl.Office.Profile.form)
2. Gender in a order of minishop2
How can I add the field «gender» (see above) in the address fields in a order? Chunk «tpl.msOrder».
3. Email addresses with errors
Sometimes new customers do write their email address with errors. Is there a way to add a second field for the email address where they have to enter the email address again to verify it?
thank you for your help.
Fabian
I some questions about using fields in minishop2 with the Extra «Office».
1. user field «gender»
I added a select field for the gender of a customer. I want to use it for the salutation (Mr. / Ms.).
It works within the Office form chunk (tpl.Office.Profile.form)
<!-- gender: {$gender} -->
<div class="form-group">
<label class="col-md-2 control-label" for="gender">Anrede</label>
<div class="col-md-2">
<select class="form-control" name="gender" id="gender">
<option value="0">-- Anrede --</option>
<option value="2" {if $gender == "2" }selected{/if}>Frau</option>
<option value="1"{if $gender == "1" }selected{/if}>Herr</option>
</select>
</div>
</div>
<!-- end gender -->But on registration (in the chunk «tpl.Office.auth.login» it does not save the gender. How do I activate it?2. Gender in a order of minishop2
How can I add the field «gender» (see above) in the address fields in a order? Chunk «tpl.msOrder».
3. Email addresses with errors
Sometimes new customers do write their email address with errors. Is there a way to add a second field for the email address where they have to enter the email address again to verify it?
thank you for your help.
Fabian
Комментарии: 2
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
2. Just as any other field in the form. After it you need to specify new field in the &userFields property of msOrder:
It will bind form field gender to profile of user in MODX.
3. I believe you could manage it with javascript on frontend, or with custom system plugin for msOnBeforeCreateOrder event that will check this new field on backend.
All 3 points are solved.
Point 3: I took the frontend javascript solution.
All the best
Fabian