Announcement

Collapse
No announcement yet.

Searchable EP Addendum

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

    Searchable EP Addendum

    Sort of off the wall but very much needed. On the Order History List (ORDH) there is a search field that lets you search for an Order Number. Is it possible to search by an Addendum field? The site is using the Addendum (and has been for many, many years) to have the customer enter a Purchase Order Number. The store owner would like customers to be able to search the order history by this Addendum field.

    In Bill's docs it shows how to display this field and I suspect if it can be displayed, it can be searched. He provided this to be able to display the field:

    Code:
    <mvt:item name="addendum" param="pick|l.all_settings:order:id" />
    &mvte:global:question2;
    My Miva foo is weak in the ways of pulling something like this in. (Although if I could find a way to convert all these entries from the Addendum into a custom field I probably could pull it from there).

    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

    #2
    Originally posted by lesliekirk View Post
    Sort of off the wall but very much needed. On the Order History List (ORDH) there is a search field that lets you search for an Order Number. Is it possible to search by an Addendum field? The site is using the Addendum (and has been for many, many years) to have the customer enter a Purchase Order Number. The store owner would like customers to be able to search the order history by this Addendum field.

    In Bill's docs it shows how to display this field and I suspect if it can be displayed, it can be searched. He provided this to be able to display the field:

    Code:
    <mvt:item name="addendum" param="pick|l.all_settings:order:id" />
    &mvte:global:question2;
    My Miva foo is weak in the ways of pulling something like this in. (Although if I could find a way to convert all these entries from the Addendum into a custom field I probably could pull it from there).
    Circling back here. I am in the process of converting this field to an Order Custom Field.

    On the OSEL screen I added


    Code:
    <mvt:item name="customfields" param="Read_Basket('po_number', g.po_number)" />
    
    <input name="po_number" id="po_number" type="text" value="&mvte:global:po_number;">
    On the OPAY screen:

    Code:
    <mvt:if expr="NOT ISNULL g.po_number">
    <mvt:item name="customfields" param="Write_Basket('po_number', g.po_number)"/>
    </mvt:if>
    <mvt:item name="customfields" param="Read_Basket('po_number', g.po_number)"/>
    On the INVC screen:

    Code:
    <mvt:item name="customfields" param="Read_Basket('po_number', l.settings:po_number)" />
    <mvt:item name="customfields" param="Write_Order(l.settings:order:id, 'po_number', l.settings:po_number)" />
    <mvt:if expr="l.settings:po_number">
    <p><strong> PO #:</strong> &mvte:po_number;</p>

    The Merchant Email

    Code:
    <mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'po_number', g.po_number)" />
    <br>PO Number: &mvte:global:po_number;
    To display on the ORDH page:

    Code:
    <mvt:if expr="l.settings:order:customfield_values:customfields:po_number">
    <div class="column half medium-one-eighth"><strong class="medium-all-hidden">Purchase Order # </strong>&mvt:order:customfield_values:customfields:po_number;</div>
    </mvt:if>

    BUT I'm having a little trouble converting the search by the Order Number to search by the custom field. It's probably something simple. Here's what I'm attempting us:

    Code:
    <mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'po_number', g.po_number)" />
    <input class="c-form-input c-form-input--large c-control-group__field" name="po_number" id="po_number" type="text" value="&mvte:global:po_number;" placeholder="PO #" required>

    What am I doing wrong here?

    Many thanks!
    Leslie

    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


      #3
      Originally posted by lesliekirk View Post

      Circling back here. I am in the process of converting this field to an Order Custom Field.

      On the OSEL screen I added


      Code:
      <mvt:item name="customfields" param="Read_Basket('po_number', g.po_number)" />
      
      <input name="po_number" id="po_number" type="text" value="&mvte:global:po_number;">
      On the OPAY screen:

      Code:
      <mvt:if expr="NOT ISNULL g.po_number">
      <mvt:item name="customfields" param="Write_Basket('po_number', g.po_number)"/>
      </mvt:if>
      <mvt:item name="customfields" param="Read_Basket('po_number', g.po_number)"/>
      On the INVC screen:

      Code:
      <mvt:item name="customfields" param="Read_Basket('po_number', l.settings:po_number)" />
      <mvt:item name="customfields" param="Write_Order(l.settings:order:id, 'po_number', l.settings:po_number)" />
      <mvt:if expr="l.settings:po_number">
      <p><strong> PO #:</strong> &mvte:po_number;</p>

      The Merchant Email

      Code:
      <mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'po_number', g.po_number)" />
      <br>PO Number: &mvte:global:po_number;
      To display on the ORDH page:

      Code:
      <mvt:if expr="l.settings:order:customfield_values:customfields:po_number">
      <div class="column half medium-one-eighth"><strong class="medium-all-hidden">Purchase Order # </strong>&mvt:order:customfield_values:customfields:po_number;</div>
      </mvt:if>

      BUT I'm having a little trouble converting the search by the Order Number to search by the custom field. It's probably something simple. Here's what I'm attempting us:

      Code:
      <mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'po_number', g.po_number)" />
      <input class="c-form-input c-form-input--large c-control-group__field" name="po_number" id="po_number" type="text" value="&mvte:global:po_number;" placeholder="PO #" required>

      What am I doing wrong here?

      Many thanks!
      Leslie
      Where is this search being performed? The only way I know that you can search for custom fields is in the admin's Order Processing.
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment


        #4
        Originally posted by Bruce - PhosphorMedia View Post

        Where is this search being performed? The only way I know that you can search for custom fields is in the admin's Order Processing.
        The search is already part of the ORDH except it uses the Order Number

        Code:
        <form method="post" action="&mvte:urls:ORDS:auto;">
        <fieldset>
        <legend>Search Orders</legend>
        <div class="c-form-list">
        <div class="c-form-list__item c-form-list__item--full">
        <label class="u-font-small u-text-uppercase" for="Order_ID">Missing an order? We can help you find it.</label>
        </div>
        <div class="c-form-list__item c-control-group u-flex">
        <input id="Order_ID" class="c-form-input c-form-input--large c-control-group__field" type="text" inputmode="decimal" name="Order_ID" placeholder="Order #" required>
        <input class="c-button c-button--large c-control-group__button u-bg-gray-50 u-border-none u-font-small u-text-uppercase" type="submit" value="Find">
        </div>
        </div>
        </fieldset>
        </form>
        One would "assume" that if the Order Number could be searched for on this page, why not a custom field? The results on the page can sorted by a custom field, why not be able to search by?


        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


          #5
          Well, search and sort are two completely different beasts. That feature would let you create your own "search" by using that feature to output the data into the history array and parse it for the PO entered.
          Bruce Golub
          Phosphor Media - "Your Success is our Business"

          Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
          phosphormedia.com

          Comment


            #6
            Originally posted by Bruce - PhosphorMedia View Post
            Well, search and sort are two completely different beasts. That feature would let you create your own "search" by using that feature to output the data into the history array and parse it for the PO entered.
            Well, yeah...but what I am trying isn't working. Hence the "what am I doing wrong here?"
            BUT I'm having a little trouble converting the search by the Order Number to search by the custom field. It's probably something simple. Here's what I'm attempting us:

            Code:
            Code:
            <mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'po_number', g.po_number)" /> <input class="c-form-input c-form-input--large c-control-group__field" name="po_number" id="po_number" type="text" value="&mvte:global:po_number;" placeholder="PO #" required>
            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


              #7
              Try something like this:

              <mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'po_number', g.po_number)" />

              <input class="c-form-input c-form-input--large c-control-group__field" name="po_number" id="po_number" type="text" value="&mvte:global:po_number;" placeholder="PO #" required>


              Create your own form pointing back to the ORDH page called "Search for PO number"
              Input field is "find_po"

              Within the order history loop use the custom field call
              <mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'po_number', g.po_number)" />
              <mvt:if expr="g.po_number EQ g.find_po">
              Display Order
              <mvt:assign name="g.found_it" value="'yes'" />

              <mvt:foreachstop />
              </mvt:if>

              <mvt:if expr="NOT(g.found_it)">
              Sorry, didn't find that po
              </mvt:if>
              Bruce Golub
              Phosphor Media - "Your Success is our Business"

              Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
              phosphormedia.com

              Comment

              Working...
              X