1

I'm running Expresso Store 2.0.6, Zoo Visitor 1.3.30, and EE 2.7.2, and having an issue with Expresso Store checkout not displaying the Zoo Visitor details of the logged in user.

I've mapped all Zoo Visitor fields in Expresso Store > Settings > Order Fields, but when a logged in user goes to the Checkout, their details are not being shown in the fields. I'm just using the built in {field:xxx) tag (ie {field:shipping_address1} ) to show the field.

If I map these fields to the Member fields, then they DO show up. The issue with this is that Zoo Visitor doesn't save back to the normal Member custom fields (either in the CP or using the update Front-End tags) ... so I can't use them either.

Anyone else replicate this issue?

Cheers.

4
  • What are your custom field names? I believe they only sync to native fields if you name them member_field_name. Nov 24 '13 at 22:41
  • They are basically what Zoo Visitor creates ... which is prefixed with mbr_ ... so mbr_shipping_address1 ... I would have thought that the mapping would mean it wouldn't matter what the field name was? I could be wrong though. Nov 24 '13 at 23:01
  • Ah that's what I'm thinking of. What about your native custom member fields? Are they prefix-less? Nov 25 '13 at 7:56
  • Thanks Jason. I misunderstood how this was implemented! Nico has set me straight in one of the answers below. Thanks for taking the time to respond! Nov 25 '13 at 11:51
2

Visitor channel fields can be mapped to native EE member fields when you prefix them with "member_" and the field_name has to match http://ee-zoo.com/docs/visitor/tutorial/working-with-native-member-fields.html

2
  • Brilliant. I've completely missed this in the docs. I think that this might be the solution for me! Nov 25 '13 at 11:49
  • So my comment was right? Andrew said his fields were mbr_ by default. Why doesn't Zoo prefix them as member_ by default? Nov 25 '13 at 15:25
2

I have answered this question asked previously

I have recently completed a build using Store 2 and Zoo Visitor, I ran into this issue but came up with a working solution.

{exp:store:checkout
    next="cart/review"
    register_member="yes"
    disable_javascript="yes"
    require="name|order_email|address1|city|state|postcode|country"
    error_handling="inline" error_delimiters='<div>|</div>' }
    {if no_items}{redirect="cart"}{/if}

    {!-- Avoid issues with parse order --}
    {exp:ifelse parse="inward"}
        {if logged_in}
            {exp:zoo_visitor:details {global:disable_categories}}
        {/if}
    {/exp:ifelse}

    <h2>Billing Information</h2>

    <label for="billing_first_name">First Name</label>
    <input type="text" name="billing_first_name" value="{if billing_first_name}{billing_first_name}{if:elseif
logged_in}{visitor:member_first_name}{/if}">
    {error:billing_first_name}

    <label for="billing_last_name">Last Name</label>
    <input type="text" name="billing_last_name" value="{if billing_last_name}{billing_last_name}{if:elseif
logged_in}{visitor:member_last_name}{/if}">
    {error:billing_last_name}

    <label for="billing_address1">Street address</label>
    <input type="text" name="billing_address1" value="{if billing_address1}{billing_address1}{if:elseif
logged_in}{visitor:billing_address}{/if}">
    {error:billing_address1}

    <label for="billing_city">Suburb</label>
    <input type="text" name="billing_city" value="{if billing_city}{billing_city}{if:elseif
logged_in}{visitor:billing_city}{/if}">
    {error:billing_city}

    <label for="billing_state">State</label>
    <select name="billing_state">
        <option value="ACT" {if (billing_state AND billing_state == "ACT") OR visitor:billing_state == "ACT"}selected{/if}>Australian
Capital Territory</option>
        <option value="NSW" {if (billing_state AND billing_state == "NSW") OR visitor:billing_state == "NSW"}selected{/if}>New South
Wales</option>
        <option value="NT"  {if (billing_state AND billing_state == "NT" ) OR visitor:billing_state == "NT" }selected{/if}>Northern
Territory</option>
        <option value="QLD" {if (billing_state AND billing_state == "QLD") OR visitor:billing_state ==
"QLD"}selected{/if}>Queensland</option>
        <option value="SA"  {if (billing_state AND billing_state == "SA" ) OR visitor:billing_state == "SA" }selected{/if}>South
Australia</option>
        <option value="VIC" {if (billing_state AND billing_state == "VIC") OR visitor:billing_state ==
"VIC"}selected{/if}>Victoria</option>
        <option value="WA"  {if (billing_state AND billing_state == "WA" ) OR visitor:billing_state == "WA" }selected{/if}>Western
Australia</option>
    </select>
    {error:billing_state}

    <label for="billing_postcode">Postcode</label>
    <input type="text" name="billing_postcode" value="{if billing_postcode}{billing_postcode}{if:elseif
logged_in}{visitor:billing_postcode}{/if}">
    {error:billing_postcode}

    <input type="hidden" name="billing_country" value="AU">


    <label for="billing_phone">Contact Number</label>
    <input type="tel" name="billing_phone" value="{if billing_phone}{billing_phone}{if:elseif
logged_in}{visitor:billing_phone}{/if}">
    {error:billing_phone}

    {if logged_out}
        <label for="order_email">Email Address</label>
        <input type="email" name="order_email" value="{order_email}">
        {error:order_email}
    {/if}

    {!-- Avoid issues with parse order --}
    {exp:ifelse parse="inward"}
        {if logged_in}
            {/exp:zoo_visitor:details}
        {/if}
    {/exp:ifelse}

{/exp:store:checkout}

Presentation HTML and Shipping Details removed for brevity.

1
  • Nice one Jeremy! Love that there are always work arounds with EE. I'm gonna try using the member_ prefix that Nico and Jason mentioned for the moment, but this is a great work around. Thanks! Nov 25 '13 at 11:50

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