3

Zoo Visitor has an elegant setting that makes {screen_name} very nice:

Set screen_name as a combination of the following fields

The default setting is {member_firstname} {member_lastname}. Perfect.

However, in Exp-resso Store, the 'billing_name' field is one field, so i'd like to automatically combine both fields to another field {member_name} which i can map to the {billing_name} field.

How can I combine to custom fields into one other field without the user ever noticing?

I'm not too fond on using a hidden field and some javascript in my registration process.

6

The only other way to do with without JavaScript would be to use an extension. Basically, hook into the POST data and programmatically update the entry/field with first and last name values. Now what hook you use and the logic required is outside the scope of this answer. But logically speaking, use an extension to update that field programmatically.

If it were me, I would go the JS route first. If you find that is problematic, I would then write to the extension - simply for the time factor. Seems like a lot of work to write an extension when JS might work fine.

3

This is how I worked around my problem:

  1. I created the field {member_name}.
  2. I set the field type to Select Dropdown with only one option: {screen_name}.
  3. I mapped the {member_name} field (with contents: {screen_name}) to {billing_name}.
  4. Zoo Visitor automatically changes the contents of {screen_name} to {member_firstname} {member_lastname}.

I'm not sure if this will always work, but I'm pretty sure it's a nice solution.

  • I would love to hear some opinions about this work around. As I wrote, it works for now. I will update the post after new discoveries. (Maybe never, if everything keeps on working...) – okenathan Dec 17 '12 at 23:29
0

This worked like a charm for me:

<input 
 type="text" 
 name="billing_name" 
 value="{visitor:global:member_firstname} {visitor:global:member_lastname}" />

I used that to replace the standard Expresso Store tag:

{field:billing_name}

Technically speaking, you're still not getting the nice, one-to-one mapping relationship between Zoo Visitor and Expresso Store but it certainly works to "fool" Expresso Store into automatically receiving the first and last name fields from Zoo Visitor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.