Setting orders search to advanced by default - xmpie-users/uStore-js GitHub Wiki

When a customer clicks into the Order history area of My Account, there is a search option at the top which allows the user to search through previous orders. By default only the basic or simple search options are shown by default, and the user needs to click the "advanced" link to see the advanced search settings.

Some customers want the advanced search settings shown when the user browses to the page.

Alt

This JavaScript can be added to the relevant store to achieve this:

<script type="text/javascript">
  $(document).ready(function (){
    if (window.location.href.toLowerCase().indexOf ("orderhistory") > -1)
      ChangeSearchType(3);
  })
</script>

For information on how to add JavaScript to your store: How to add JavaScript to a storefront.

⚠️ **GitHub.com Fallback** ⚠️