Announcement

Collapse
No announcement yet.

SPPP Canonical links

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

    SPPP Canonical links

    Hi Folks,

    Now I may be overthinking this, hopefully I've overlooked something simple... My Canonical Links are not working properly with Single Product Per Page!

    My canonical links were not displaying on the Single Product Per Page, brochure or home page.

    This is the default code in Sellerdeck.

    <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionPaginationIncludeFullPage%22%20%2f%3e%20%3d%3d%201" >
    <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionPaginationCurrentPageIndex%22%20%2f%3e%20%3e%200%29" >
    <!-- Tell search engines how to index paginated sections -->
    <link rel="canonical" href="<actinic:variable name="SectionPaginationFullPageURL" />"></actinic:block>
    </actinic:block>


    But in order to get the Canonical link in the Single Product Per Page, brochure page and home page, I upgraded the script to this:

    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsBrochureHomePage%22%20%2f%3e">
    <link rel="canonical" href="http://www.snazzles.net/" /> </actinic:block>
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsBrochureHomePage%22%20%2f%3e%20%3d%3d%20false">
    <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Brochure%27" >
    <link rel="canonical" href="http://www.snazzles.net/<actinic:variable name="BrochurePageURL" />" />
    </actinic:block>
    </actinic:block>
    <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22" >
    <link rel="canonical" href="<actinic:variable name="CatalogURL" /><actinic:variable name="SectionPageName" />" />
    </actinic:block>
    <actinic:block if="%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Product%20Page%22%29" >
    <link rel="canonical" href="http://www.snazzles.net/Costumes/<actinic:variable name="ProductPageName" />">
    </actinic:block>

    However the Single Product Per Page is giving incorrect URL's.

    This page: http://www.snazzles.net/costumes/Spi...8.html#SID=178

    ...should display:
    <link rel="canonical" href="http://www.snazzles.net/Costumes/Spiderman---Second-Skin---Adult-s-Second-Skin-880948.html">


    ...but instead it's displaying:
    <link rel="canonical" href="http://www.snazzles.net/Costumes/C:\ProgramData\SellerDeck 2013\Snazzles\SiteHTML\Spiderman---Second-Skin---Adult-s-Second-Skin-880948.html">


    Any help would be appreciated.... Thanks.
    ____________________
    Paul Daly
    www.dalydesign.co.uk
    web design | graphic design | illustration

    #2
    This code works:
    Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Product%20Page%27">
    <link rel="canonical" href="<actinic:block php="true">echo '<actinic:variable name="CatalogURL" encoding="perl" selectable="false" />' . basename('<actinic:variable name="ProductPageName" encoding="perl" selectable="false" />');</actinic:block>">
    </actinic:block>
    This uses code thanks to Norman from: Single Product per Page URL for Javascript.
    Peblaco

    Comment


      #3
      Thanks! That worked a treat!

      They should add that to the AUG. Google webmaster support told me last week that each page should have canonical link tags rather than just the home page as they suddenly changed a web address of one of my clients sites to an alias.

      I.e. google listed snazzles.net in its rankings and we had a few domains set up as alias' of that site, so they were all redirecting to www.snazzles.net. Suddenly, google changed all our results listings to a different domain name. They blamed new complex google algorithms and suggested the canonical should be applied to every page.
      ____________________
      Paul Daly
      www.dalydesign.co.uk
      web design | graphic design | illustration

      Comment


        #4
        Great big of code to get round the routine that pulls in the local computer files route. I tried all sorts but could never have come up with that. Fantastic.
        Quality engraved Sports Awards, Golf Trophies and Football Trophies in 3 -7 days.

        Comment


          #5
          Originally posted by dalydesign View Post
          in order to get the Canonical link in the Single Product Per Page, brochure page and home page, I upgraded the script
          Note if you are using SellerDeck filtering “make filtering the default view” the link changes to a cgi-bin link and requires 301 redirects or a canonical tag, however the canonical tag cannot use variables store folder and page name for filtered pages as it affects search engines listings as they can't index content. See: http://community.sellerdeck.com/showthread.php?t=55375
          Peblaco

          Comment

          Working...
          X