Announcement

Collapse
No announcement yet.

Including the category code in the URI

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

    Including the category code in the URI

    How do you go about getting the URI Management to include a category code or category name in the product link? The store owner is wanting to take full advantage of the URI management to be able to change out product codes into a more SEO friendly structure (per her SEO expert). Should it be the canonical category code or can it be a "fictitious" category code or name?

    I'm trying to avoid needing to create and then "hide" a parent category and then have to assign all the products to it just for the URI link

    I attempted to create a URI with a fictitious category as part of the link, set it up as the canonical and redirected the existing to it but it just went to the home page (I may need to check the htaccess file)


    Some of the category links are to have a parent category code (name) and a sub-category code (name). For example:

    /parent-category/sub-category/category-name.html

    Is this doable too?



    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
    Since the URI system can have specific URLs for every product, just create them in a spreadsheet and upload.

    Using a temporary work page, you could run a bunch of nested SubCat routines

    SubCat(one)
    ASSIGN catlink VALUE '/category_code'
    SubCat(two)
    IF NOTSubCat(two)
    ASSIGN catlink VALUE catlink + '.html'
    ELSE
    ASSIGN catlink VALUE catlink + SubCat(two) + '.html'

    etc

    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


      #3
      Originally posted by Bruce - PhosphorMedia View Post
      Since the URI system can have specific URLs for every product, just create them in a spreadsheet and upload.

      I tried creating a URI I wanted for one product using a faux category in the URI. It didn't work, it redirected to the home page. That leads me to test creating a real category, then assigning the product to it and seeing if it works.

      But do I need to change the URI Management Product URI Template? Currently, it's /&mvt:product:code;.html - if so, what should it be?

      What about the Canonical Category Code? I'm thinking it's going to also need to be changed to this new category I'm going to need to create?

      I suspect that may be a few more steps I need to take before I even consider creating a temporary work page.

      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


        #4
        The following product URI template allows us to include the canonical category code in newly generated product URIs (assuming the product is created manually via the Miva admin.)


        Code:
        /<mvt:if expr="len(g.Product_Category_Code)"><mvt:eval expr="tolower(g.Product_Category_Code)" />/</mvt:if><mvt:eval expr="tolower(l.settings:product:code)" />.html
        Unfortunately, I'm not sure how to leverage the canonical category code for URI generation for products created via import.
        Justin Sims
        216digital
        Cleveland Area - Code and Design
        https://216digital.com/

        Comment


          #5
          Originally posted by 216justin View Post
          The following product URI template allows us to include the canonical category code in newly generated product URIs (assuming the product is created manually via the Miva admin.)


          Code:
          /<mvt:if expr="len(g.Product_Category_Code)"><mvt:eval expr="tolower(g.Product_Category_Code)" />/</mvt:if><mvt:eval expr="tolower(l.settings:product:code)" />.html
          Unfortunately, I'm not sure how to leverage the canonical category code for URI generation for products created via import.
          Thanks! Can I go back into the admin and update the URI's in the Product admin?

          Have you tried this with the slugify? I think I'll try this since I can't get the slugify to work (it's like it's a redirect issue).

          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


            #6
            Originally posted by 216justin View Post
            The following product URI template allows us to include the canonical category code in newly generated product URIs (assuming the product is created manually via the Miva admin.)


            Code:
            /<mvt:if expr="len(g.Product_Category_Code)"><mvt:eval expr="tolower(g.Product_Category_Code)" />/</mvt:if><mvt:eval expr="tolower(l.settings:product:code)" />.html
            Unfortunately, I'm not sure how to leverage the canonical category code for URI generation for products created via import.
            Yeah, I think it may take a bit more work. I can't get this to work either

            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
              I think I'm getting closer to making this work. I discovered a couple of old lines in the dev site htaccess file that seem to have been the culprit.

              Now to see if I can get the CTGY page product links to "look" the same. When you mouse over the link it's still the old one but it does redirect to the new canonical. So I'm thinking I may still need to make more changes somewhere so that the canonical looking link shows itself everywhere.

              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


                #8
                I think I'm getting closer to making this work. I discovered a couple of old lines in the dev site htaccess file that seem to have been the culprit.
                Now to see if I can get the CTGY page product links to "look" the same. When you mouse over the link it's still the old one but it does redirect to the new canonical. So I'm thinking I may still need to make more changes somewhere so that the canonical looking link shows itself everywhere.

                I think I may need to combine all my questions into one thread, but I think I need to start a new post to ask questions about how to change slugify for the links.
                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