Announcement

Collapse
No announcement yet.

Product to Category 301 redirects via flat file

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

    Product to Category 301 redirects via flat file

    While it works great after manually configuring a couple of them in the admin (using the product URI), I need to redirect a lot of products to a category. What does the flat file import look like for something like this? I'm having trouble finding an example.
    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
    Something like this:
    URI CANONICAL STATUS PAGE_CODE CATEGORY_CODE PRODUCT_CODE FEED_CODE
    /product/your-product-uri.html No 301 Your-category-code
    You can export your current URIs and use what you have in there as a template.

    Comment


      #3
      Originally posted by lesliekirk View Post
      While it works great after manually configuring a couple of them in the admin (using the product URI), I need to redirect a lot of products to a category. What does the flat file import look like for something like this? I'm having trouble finding an example.
      I had exported the data below and made the changes I wanted at the time & then reuploaded it. Hope this helps.

      Example of flat file import columns.PNG
      Attached Files



      Kathleen Steimle-Hermes
      , owner
      Miss Kate's Creations
      [email protected]
      www.misskatescreations.com


      Handcrafted fabric covered photo albums, frames, brag books and MORE


      Comment


        #4
        Originally posted by RTHOMASDESIGN View Post
        Something like this:
        URI CANONICAL STATUS PAGE_CODE CATEGORY_CODE PRODUCT_CODE FEED_CODE
        /product/your-product-uri.html No 301 Your-category-code
        You can export your current URIs and use what you have in there as a template.
        When I create my import file do I also include the Product Code?
        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


          #5
          Also, what should the import settings look like?


          G7kIil.png
          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
            It doesn't look like you have enough columns. How would Miva determine what the URI is supposed to be for? Looking at the three columns you have... /W1230SA.html as a URI, but Miva wouldn't know what the URI is for (it can't assume it's for product W1230SA). As said in the previous post, I think the easiest way to do this is to do an export, look at the data you already have, make a copy, and then use the file as a template. That way you can have Miva "Determine Automatically Using Header Row" in import settings.

            Comment


              #7
              I put together a quick template that you (or other readers) can download here for importing:
              https://rthomasdesign.com/Miva-URI-Template.csv

              It should make sense just looking at it :)

              Comment


                #8
                Originally posted by RTHOMASDESIGN View Post
                It doesn't look like you have enough columns. How would Miva determine what the URI is supposed to be for? Looking at the three columns you have... /W1230SA.html as a URI, but Miva wouldn't know what the URI is for (it can't assume it's for product W1230SA). As said in the previous post, I think the easiest way to do this is to do an export, look at the data you already have, make a copy, and then use the file as a template. That way you can have Miva "Determine Automatically Using Header Row" in import settings.
                Yes, I was missing the Category Code - many thanks, all is good. Works like a charm!
                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


                  #9
                  I was so excited when I thought I had this working just like I wanted it to until I discovered that ALL of the products are still "discoverable" via the long-style links. I first noticed it on the SMAP page. Now I have to figure out where my sitemap generator app is finding all of these long links at because they do NOT redirect when clicked on. So what is the fix for this?
                  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


                    #10
                    Actually, we have 61000 products for a brand, and we need to change the codes just for those products by removing them and uploading them with new product codes. So, in order to not come up as a 404 Not found error code on someone's search, we want to do a 301 redirect for all those old URLs to the new URLs (same products but with different codes).
                    For e.g., an old link would be
                    guaranteedparts.com/product/VIKINGR-VKPA020041.html
                    & the new link would be   
                    guaranteedparts.com/product/viking-pa020041.html

                    guaranteedparts.com/product/VIKINGR-VKPA020041.html
                    301 redirect to
                    guaranteedparts.com/product/viking-pa020041.html

                    Comment


                      #11
                      Originally posted by Shiv View Post
                      Actually, we have 61000 products for a brand, and we need to change the codes just for those products by removing them and uploading them with new product codes. So, in order to not come up as a 404 Not found error code on someone's search, we want to do a 301 redirect for all those old URLs to the new URLs (same products but with different codes).
                      For e.g., an old link would be
                      guaranteedparts.com/product/VIKINGR-VKPA020041.html
                      & the new link would be   
                      guaranteedparts.com/product/viking-pa020041.html

                      guaranteedparts.com/product/VIKINGR-VKPA020041.html
                      301 redirect to
                      guaranteedparts.com/product/viking-pa020041.html
                      Is it possible to do so? If yes, then how should I do it?

                      Comment


                        #12
                        Originally posted by Shiv View Post
                        Actually, we have 61000 products for a brand, and we need to change the codes just for those products by removing them and uploading them with new product codes.
                        My suggestion would be to use XML Provisioning and update the product codes rather than delete and reupload. Updating the product codes will leave the product URL so there will be no 404 errors. If needed a spreadsheet or XML can be created to create redirects for the products as well.

                        Here is a link to the XML format needed to update a product code.

                        https://gist.github.com/steveosoule/...oduct%20Update

                        It should look something like this:

                        Code:
                        <!-- Product Update -->
                        <Product_Update code="current_code">
                        <Code>new_code</Code>
                        </Product_Update>
                        Also here is a link to the XML format to update/add/delete URIs in Miva

                        https://gist.github.com/steveosoule/...8d4edbcd046be6

                        Once the files have been created they can be uploaded in the Miva admin under Data Management using the Import Data and Settings in XML Provisioning Format option.
                        Nicholas Adkins
                        Technical Training Specialist / Miva, Inc.
                        [email protected]
                        https://www.miva.com/mivalearn

                        Comment

                        Working...
                        X