Announcement

Collapse
No announcement yet.

XML sitemap

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

    XML sitemap

    I checked my SD2016 generated sitemap, in webmaster tools it says 16 pages indexed out of over 1350!

    It seems that 2016 uploaded 16 url's in https (my site is all https through SD) the rest it decided to class as http.

    So frustrating when you go software / hosting / payments / even ssl all under one company and still get silly issues.
    https://www.harrisontelescopes.co.uk/

    Ed Harrison - Menmuir Scotland

    #2
    YASB (Yet Another SellerDeck Bug). The CatalogURL variable is always returning http://.... even when the whole site is set to use https.

    A fix would be to edit layout XML Site Map Mayout and replace all:
    Code:
    <actinic:variable name="CatalogURL" />
    WIth:
    Code:
    <actinic:block php="true">$url = '<actinic:variable name="CatalogURL" encoding="perl" selectable="false" />'; if ( <actinic:variable name="IsSSLUsedForWholeSite" selectable="false" /> ) $url = str_replace('http://', 'https://', $url); echo $url;</actinic:block>
    Here's the whole layout patched:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
    <actinic:block type="BrochurePagesList">
    <url><loc><actinic:variable name="AbsoluteBrochurePageURL" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>1.00</priority></url>
    </actinic:block>
    <actinic:block type="EntireSectionList">
    <url><loc><actinic:block php="true">$url = '<actinic:variable name="CatalogURL" encoding="perl" selectable="false" />'; if ( <actinic:variable name="IsSSLUsedForWholeSite" selectable="false" /> ) $url = str_replace('http://', 'https://', $url); echo $url;</actinic:block><actinic:variable name="SectionHref" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>1.00</priority></url>
    <actinic:block type="ProductList" />
    <url><loc><actinic:block php="true">$url = '<actinic:variable name="CatalogURL" encoding="perl" selectable="false" />'; if ( <actinic:variable name="IsSSLUsedForWholeSite" selectable="false" /> ) $url = str_replace('http://', 'https://', $url); echo $url;</actinic:block><actinic:variable name="ProductPageName" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>1.00</priority></url>
    </actinic:block>
    </actinic:block>
    <url><loc><actinic:block php="true">$url = '<actinic:variable name="CatalogURL" encoding="perl" selectable="false" />'; if ( <actinic:variable name="IsSSLUsedForWholeSite" selectable="false" /> ) $url = str_replace('http://', 'https://', $url); echo $url;</actinic:block><actinic:variable name="InfoURL" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>0.70</priority></url>
    <actinic:block if="%21%3cactinic%3avariable%20name%3d%22IsUseRelativeCgiUrls%22%20%2f%3e" ><url><loc><actinic:variable name="LoginPageURL" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>0.50</priority></url></actinic:block>
    <actinic:block if="%21%3cactinic%3avariable%20name%3d%22IsUseRelativeCgiUrls%22%20%2f%3e%20AND%20%0d%3cactinic%3avariable%20name%3d%22IsOrderTrackingEnabledForUnreg%22%20%2f%3e%20%20%3d%3d%20%20true" ><url><loc><actinic:variable name="RecentOrdersLinkText" /><actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e%20%3d%3d%20TRUE">&SHOP=<actinic:variable name="ShopID" /></actinic:block></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>0.60</priority></url></actinic:block >
    <actinic:block if="%21%3cactinic%3avariable%20name%3d%22IsUseRelativeCgiUrls%22%20%2f%3e" ><url><loc><actinic:variable name="SendMailPageLink" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>0.60</priority></url></actinic:block>
    <url><loc><actinic:block php="true">$url = '<actinic:variable name="CatalogURL" encoding="perl" selectable="false" />'; if ( <actinic:variable name="IsSSLUsedForWholeSite" selectable="false" /> ) $url = str_replace('http://', 'https://', $url); echo $url;</actinic:block><actinic:variable name="SearchPageURL" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>0.50</priority></url>
    </urlset>
    Note that CatalogURL is used elsewhere - e.g. in the Google Product Feed Layout so these layouts may need alooking at too.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thank you Norman...I will try this in a few mins and upload it.
      https://www.harrisontelescopes.co.uk/

      Ed Harrison - Menmuir Scotland

      Comment


        #4
        Hi, Ed. Just made a few improvements. Best revisit my post #2 above.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Thanks Norman, I gave up with Google product feed via 2016 as it was also ex vat, thankfully Andy (codepath) has a perfect plug in for that one.

          Tested and all submitted, all url's are now showing https in the xml file, brilliant.
          https://www.harrisontelescopes.co.uk/

          Ed Harrison - Menmuir Scotland

          Comment


            #6
            The above uses a rather long bit of replacement code. Here's a way to do it more concisely.

            In Design / Library / Layouts / JavaScript Header Functions / Standard Javascript Header Functions, add the following at the top:
            Code:
            <actinic:block php="true">
            	$catalogurl = '<actinic:variable name="CatalogURL" encoding="perl" selectable="false" />';
            	if ( <actinic:variable name="IsSSLUsedForWholeSite" selectable="false" /> ) $catalogurl = str_replace('http://', 'https://', $catalogurl);
            </actinic:block>
            Now in any layouts that need CatalogURL fixed, replace:
            Code:
            <actinic:variable name="CatalogURL" />
            With:
            Code:
            <actinic:block php="true">echo $catalogurl;</actinic:block>
            Here's XML Site Map Layout using the above:
            Code:
            <?xml version="1.0" encoding="UTF-8"?>
            <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
            <actinic:block type="BrochurePagesList">
            <url><loc><actinic:variable name="AbsoluteBrochurePageURL" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>1.00</priority></url>
            </actinic:block>
            <actinic:block type="EntireSectionList">
            <url><loc><actinic:block php="true">echo $catalogurl;</actinic:block><actinic:variable name="SectionHref" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>1.00</priority></url>
            <actinic:block type="ProductList" />
            <url><loc><actinic:block php="true">echo $catalogurl;</actinic:block><actinic:variable name="ProductPageName" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>1.00</priority></url>
            </actinic:block>
            </actinic:block>
            <url><loc><actinic:block php="true">echo $catalogurl;</actinic:block><actinic:variable name="InfoURL" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>0.70</priority></url>
            <actinic:block if="%21%3cactinic%3avariable%20name%3d%22IsUseRelativeCgiUrls%22%20%2f%3e" ><url><loc><actinic:variable name="LoginPageURL" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>0.50</priority></url></actinic:block>
            <actinic:block if="%21%3cactinic%3avariable%20name%3d%22IsUseRelativeCgiUrls%22%20%2f%3e%20AND%20%0d%3cactinic%3avariable%20name%3d%22IsOrderTrackingEnabledForUnreg%22%20%2f%3e%20%20%3d%3d%20%20true" ><url><loc><actinic:variable name="RecentOrdersLinkText" /><actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e%20%3d%3d%20TRUE">&SHOP=<actinic:variable name="ShopID" /></actinic:block></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>0.60</priority></url></actinic:block >
            <actinic:block if="%21%3cactinic%3avariable%20name%3d%22IsUseRelativeCgiUrls%22%20%2f%3e" ><url><loc><actinic:variable name="SendMailPageLink" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>0.60</priority></url></actinic:block>
            <url><loc><actinic:block php="true">echo $catalogurl;</actinic:block><actinic:variable name="SearchPageURL" /></loc><lastmod><actinic:block php="true" >echo date("Y-m-d"),"T", date("H:i:s"),"+00:00";</actinic:block></lastmod><priority>0.50</priority></url>
            </urlset>
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              product feed via 2016 as it was also ex vat
              The CatalogURL variable is always returning http://.... even when the whole site is set to use https.
              Apologies, these are two known bugs, refs SD-6372 (actually the tax inc/ex settings were simply the wrong way round) and SD-6079. Both are fixed in the forthcoming v16.0.2.
              Bruce Townsend
              Ecommerce Product Manager
              Sellerdeck Ecommerce Solutions

              Comment

              Working...
              X