Announcement

Collapse
No announcement yet.

Search Results Layout

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

    Search Results Layout

    When a search generates only one product is there a way to go straight to the product, and not stop at the Search Results Layout page?
    Keith Oratz
    PrepareSmart, LLC - Emergency Preparedness Supplies and Professional Grade Search and Rescue Gear
    www.preparesmart.com

    #2
    Re: Search Results Layout

    Not by default, but you could add some code to redirect to the correct page.

    Code:
    <mvt:assign name="g.results_returned" value="miva_array_elements( l.settings:search_results:products )" />
    <mvt:if expr="g.results_returned EQ 1">
    	<mvt:assign name="l.null" value="miva_output_header( 'Location', '/product/' $ l.settings:search_results:products[1]:code $ '.html'  )" />
    </mvt:if>
    The second parameter in the miva_output_header function will need to be updated to match your Product page url structure.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment

    Working...
    X