Announcement

Collapse
No announcement yet.

Adding Customer Custom Fields to Ship To / Bill To

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding Customer Custom Fields to Ship To / Bill To

    I need to add a Customer Custom Field to all of the templates that collect the customer Ship To and Bill To information, then be able to pass it through all the checkout screen, the notification emails and into the Customer account. I took a look at this post which has very good instructions from [email protected] but is for Order Custom Fields. I need to start on either the OCST or ACAD (ACED) Pages and pass the data on from there.

    https://www.miva.com/forums/forum/on...-checkout-page

    I also need to understand what controls the CSS for the field. It looks like it could possibly javascript that is appending the div class to include the class "floating-placeholder-float". Trying to add the class is ignored.

    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

  • Hi Leslie,

    If this is information you need to store at the customer level, then you would need to create the custom customer fields first. Then, add them to ACAD and ACED for storing an displaying. For the checkout process, you can use custom basket fields, similar to the Order Instructions on OSEL, then write them to the custom customer fields, and then read them on INVC and the emails.

    For the styling, you should be able to use this pattern:
    Code:
    <div class="floating-placeholder">
        <input id="" class="input" type="text" name="" value="">
        <label for=""></label>
    </div>
    Matt Zimmermann
    Director of UI/UX
    / Miva, Inc.

    Comment


    • Originally posted by Matt Zimmermann View Post
      Hi Leslie,

      If this is information you need to store at the customer level, then you would need to create the custom customer fields first. Then, add them to ACAD and ACED for storing an displaying. For the checkout process, you can use custom basket fields, similar to the Order Instructions on OSEL, then write them to the custom customer fields, and then read them on INVC and the emails.

      For the styling, you should be able to use this pattern:
      Code:
      <div class="floating-placeholder">
      <input id="" class="input" type="text" name="" value="">
      <label for=""></label>
      </div>
      The Custom Customer field was created.

      Is the only place that this field can be collected is at the ACAD and ACED screens? Or is the assumption that the customer is logged and the info was collected when the account was created?

      Leslie Kirk
      Miva Certified Developer
      Miva Merchant Specialist since 1997
      Previously of Webs Your Way
      (aka Leslie Nord leslienord)

      Email me: [email protected]
      www.lesliekirk.com

      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

      Comment


      • You can collect the information on any page with a form and then write to the custom field on the page that processes that form. Usually customer ones would be used on ACAD, ACED, and OCST (if logged in).
        Matt Zimmermann
        Director of UI/UX
        / Miva, Inc.

        Comment


        • So I have a lot of code going on trying to pass the values on (probably too much to try and post here. I had tried to use the OSEL Order Instructions as a starting point on the OCST screen
          Code:
          <div class="column whole medium-one-third form-row &mvte:global:BuyerID_Row;">
                          <div class="floating-placeholder floating-placeholder-float">
                              <mvt:if expr="g.Previous_Screen EQ 'OSEL'">
                                              <mvt:item name="customfields" param="Write_Basket('BuyerID', g.BuyerID)" />
                                          <mvt:else>
                                              <mvt:item name="customfields" param="Read_Basket('BuyerID', g.BuyerID)" />
                                          </mvt:if>
                                              <input type="text" name="BuyerID" id="l-BuyerID" value="&mvte:global:BuyerID;" class="input">
                              <label for="l-BuyerID">Buying Group ID</label>
                          </div>
                      </div>
          This info isn't being passed on to (I see part of the problem here but I'm not seeing the results on the OPAY screen either):

          Code:
          <mvt:if expr="l.settings:page:code EQ 'OPAY' AND g.BuyerID">
                              &mvte:global:BuyerID;<br>
                  </mvt:if>

          On the OSEL screen, I did add this

          Code:
          <mvt:if expr="g.Previous_Screen EQ 'OCST '">
              <mvt:item name="customfields" param="Write_Basket('BuyerID', g.BuyerID)" />
          <mvt:else>
              <mvt:item name="customfields" param="Read_Basket('BuyerID', g.BuyerID)" />
          </mvt:if>
          I added this to the OPAY

          Code:
          <mvt:if expr="g.Previous_Screen EQ 'OSEL'">
              <mvt:item name="customfields" param="Write_Basket('BuyerID', g.BuyerID)" />
          <mvt:else>
              <mvt:item name="customfields" param="Read_Basket('BuyerID', g.BuyerID)" />
          </mvt:if>
          I'd at least like to get the field to pass data then I can go back to the CSS issues.





          Leslie Kirk
          Miva Certified Developer
          Miva Merchant Specialist since 1997
          Previously of Webs Your Way
          (aka Leslie Nord leslienord)

          Email me: [email protected]
          www.lesliekirk.com

          Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

          Comment


          • On OSEL, try this:
            Code:
            <div class="column whole medium-one-third form-row &mvte:global:BillCompany_Row;">
                <div class="floating-placeholder">
                    <mvt:if expr="g.Previous_Screen EQ 'OSEL'">
                        <mvt:item name="customfields" param="Write_Basket('BuyerID', g.BuyerID)" />
                    <mvt:else>
                        <mvt:item name="customfields" param="Read_Basket('BuyerID', g.BuyerID)" />
                    </mvt:if>
                    <input id="l-BuyerID" class="input" type="text" name="BuyerID" value="&mvte:global:BuyerID;">
                    <label for="l-BuyerID">Buying Group ID</label>
                </div>
            </div>
            Then update OPAY with this:
            Code:
            <mvt:if expr="g.Previous_Screen EQ 'OSEL'">
                <mvt:item name="customfields" param="Write_Basket('order_instructions', g.order_instructions)" />
                <mvt:item name="customfields" param="Write_Basket('BuyerID', g.BuyerID)" />
            <mvt:else>
                <mvt:item name="customfields" param="Read_Basket('order_instructions', g.order_instructions)" />
                <mvt:item name="customfields" param="Read_Basket('BuyerID', g.BuyerID)" />
            </mvt:if>
            &mvte:global:BuyerID;<br>
            Matt Zimmermann
            Director of UI/UX
            / Miva, Inc.

            Comment


            • Sorry for the delay in getting back to you Matt Zimmermann - it looks like you are suggesting putting the input field on the OSEL screen. The store owner needs it on the OCST screen as part of the Ship To/Bill To. So, it sounds like I should go back to trying to get this added to the ACAD and ACED screens. What is the best way to start on the screens and then have the custom field content display (or be able to be edited) on the OCST, then include the content on the OSEL and OPAY screens via the ReadyTheme Content Section "Checkout: Address Summary"
              Leslie Kirk
              Miva Certified Developer
              Miva Merchant Specialist since 1997
              Previously of Webs Your Way
              (aka Leslie Nord leslienord)

              Email me: [email protected]
              www.lesliekirk.com

              Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

              Comment


              • Hi Leslie,

                In that case, on OCST:
                Code:
                <div class="column whole medium-one-third form-row &mvte:global:BillCompany_Row;">
                    <div class="floating-placeholder">
                        <mvt:item name="customfields" param="Read_Basket('BuyerID', g.BuyerID)" />
                        <input id="l-BuyerID" class="input" type="text" name="BuyerID" value="&mvte:global:BuyerID;">
                        <label for="l-BuyerID">Buying Group ID</label>
                    </div>
                </div>
                Then, on OSEL:
                Code:
                <mvt:if expr="g.Previous_Screen EQ 'OCST'">
                    <mvt:item name="customfields" param="Write_Basket('BuyerID', g.BuyerID)" />
                <mvt:else>
                    <mvt:item name="customfields" param="Read_Basket('BuyerID', g.BuyerID)" />
                </mvt:if>
                &mvte:global:BuyerID;<br>
                Matt Zimmermann
                Director of UI/UX
                / Miva, Inc.

                Comment


                • Matt,

                  While we are on the subject, when you Write to a custom Customer field, does it overwrite or append if there is existing data?

                  I've never tested it, but inquiring minds want to know.

                  If it will append, then I may need to go back and re-write some of my pages with conditionals where I have used the Custom Customer Field.
                  Thank you,
                  Shannon
                  Shannon Wright
                  Xact Xpressions, Inc.

                  Comment


                  • Hi Shannon,

                    Unless you were to write your code in a way that pulled in the value and appended to it, the default is to overwrite the value.
                    Matt Zimmermann
                    Director of UI/UX
                    / Miva, Inc.

                    Comment

                    Working...
                    X

                    This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

                    This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

                    Accept