Announcement

Collapse
No announcement yet.

URI Look Up

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

    URI Look Up

    I am working to install power search and I am unable to get the URI look up function to work at all.

    Here is the code I am using, which is from the How-To docs
    Code:
            <mvt:assign name="l.uri:product_id" value="l.all_settings:product:id" />
            <mvt:do file="g.Module_Feature_URI_DB" name="l.have_uri" value="URI_Load_Item_Canonical( l.uri, l.settings:canonical_uri )" />
            <mvt:if expr="l.have_uri">
                <a href="&mvt:canonical_uri:canonical;" title="&mvte:product:name;">
            <mvt:else>
                <a href="/&mvts:product:name;.html" title="&mvte:product:name;">
            </mvt:if>
    This code is being used in the power search product layout template.

    The Miva engine is 5.26

    Thanks for the help. I am sure I am missing something simple with the do function.

    CN
    Calvin Nelson
    Director of Web Development
    2C Development Group

    #2
    Does your l.all_settings:product:id have a value? Try outputting that to the page to ensure your getting back a product id.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      My bad, that was a lightly old code chunk. I already checked that and l.all_settings returns nothing.

      l.settings:product:id; does however return a value.

      Code:
      <mvt:assign name="l.uri:product_id" value="l.settings:product:id" />
      That is what is in there now and it is still not working.
      Calvin Nelson
      Director of Web Development
      2C Development Group

      Comment


        #4
        See this example. Your l.uri structure needs to contain all the members listed here:

        http://docs.miva.com/code-samples/load-canonical-uri
        Brennan Heyde
        VP Product
        Miva, Inc.
        [email protected]
        https://www.miva.com

        Comment


          #5
          Looks like this is working now. It was a combo of the canonical object not having a value, and then the product id not being correct. Fixed now. Thanks.
          Calvin Nelson
          Director of Web Development
          2C Development Group

          Comment


            #6
            Originally posted by cnelson View Post
            Looks like this is working now. It was a combo of the canonical object not having a value, and then the product id not being correct. Fixed now. Thanks.
            Hey Calvin, would you mind posting what you used to make this work? Thanks!
            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

            Working...
            X