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>
Announcement
Collapse
No announcement yet.
Searchable EP Addendum
Collapse
X
-
Well, yeah...but what I am trying isn't working. Hence the "what am I doing wrong here?"Originally posted by Bruce - PhosphorMedia View PostWell, 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.
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>
Leave a comment:
-
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.
Leave a comment:
-
The search is already part of the ORDH except it uses the Order NumberOriginally 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.
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?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>
Leave a comment:
-
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.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
On the OPAY screen: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 INVC 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)"/>
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
To display on the ORDH page:Code:<mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'po_number', g.po_number)" /> <br>PO Number: &mvte:global:po_number;
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
Leave a comment:
-
Circling back here. I am in the process of converting this field to an Order Custom Field.Originally posted by lesliekirk View PostSort 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:
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).Code:<mvt:item name="addendum" param="pick|l.all_settings:order:id" /> &mvte:global:question2;
On the OSEL screen I added
On the OPAY screen: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 INVC 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)"/>
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
To display on the ORDH page:Code:<mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'po_number', g.po_number)" /> <br>PO Number: &mvte:global:po_number;
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
Leave a comment:
-
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:
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).Code:<mvt:item name="addendum" param="pick|l.all_settings:order:id" /> &mvte:global:question2;
Tags: None
Leave a comment: