3

I'm trying to get this situation working, but I'm not 100% it can actually be done.

I've build a custom checkout process where the customer fills in his shipping info, billing info (if different), chooses a payment method and registers an account or not. All on one single page.

Processing the order goes well - however no entry is added to the Zoo Visitor channel, only a native Member account is created.

UPDATE 2013.12.16

I tried a new setup begin this week. Unfortunately Store is still not mapping correctly to Visitor.

Current setup:
EE 2.7.3
Store 2.1.0
Visitor 1.3.30

One strange thing in the Store Order Fields setup;
The field-groups to choose the mapping-fields from are not rendered correctly (see attached screenshot). Instead of Zoo Visitor it says "optgroup_zoo_fields".
It was a brand new install.

Other insights which could help;

  • Do I need to alter the checkout fields in templating?
  • Do I also need to create Member Custom Fields for this to work?

I was assuming 'no' to both, maybe that's my faulty approach...

In short;
- Visitor channel + custom fields are created
- Order Fields are Mapped to Visitor fields
- A normal member is created on order-complete / payment
- No Visitor entry is created

enter image description here

  • Can you email support@exp-resso.com about this? I think we will need to take a look at your setup to figure out what is going on. – Adrian Macneil Oct 7 '13 at 5:43
4

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.

| improve this answer | |
  • Where can I get a list of all of the zoo_visitor fields? If I use {visitor:global:shipping_phone}, it just displays the text '{visitor:global:shipping_phone}' in the textbox? – heinkasner Jul 4 '14 at 14:20
3

I have nearly the same setup (Store 2.0.3, EE 2.7.2, Zoo Visitor 1.3.29) — and I'm still unable to get Store's billing info fields to become pre-filled with an already-registered, currently-logged-in member.

For the time being, I'm grabbing that data from ZV, like so:

<input type="text" name="billing_last_name" value="{if logged_in}{visitor:global:member_lastname}{/if}" />

…instead of using the {field:billing_last_name} tag.

It works fine for now, but the problem is that this won't work for select dropdowns, like State or Country. So the first option is selected by default.

I just recently upgraded to Store 2.0.3 from 1.6.4 and it was working fine before, so I'm assuming it's a 2.0.3 issue.

| improve this answer | |
  • Yes I see that the 'last name' of the zoo visitor member part does not use a '_' between 'last' and 'name' (member_lastname instead of member_last_name) – heinkasner Jul 4 '14 at 14:21
3

This was a bug in Store, where mapped Zoo Visitor member fields were correctly saved after placing an order, but they were not loaded for new carts.

This has been fixed in Store 2.1.0:

Fixed mapped Zoo Visitor member fields not being loaded for new orders

https://exp-resso.com/docs/release_notes.html#store_210

| improve this answer | |

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.