Page 7 of 10 FirstFirst ... 56789 ... LastLast
Results 61 to 70 of 94
  1. #61
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,167
    Plugin Contributions
    29

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    I assume you are using the version from Github...if not, please do so.

    1. Is the plugin multilingual?
    The things it displays are almost all scraped from the page so will be in the page language.
    But, constants entered in the admin page are used directly. If you want those different, then you will have to change the constant name, make new ones and put them in the /language/extra_defines folder.

    So, if you enter japanese in the admin, it gets garbled in the plugin output somewhere?
    Can you put an example of the admin text and a screenshot of the output?

    3. I presume one does not need any re-writer for the product URLs.
    Dunno I use CEON. I will try with a test site.
    Steve
    github.com/torvista: Spanish Language Pack, Image Checker, Structured Data, BackupMySQL Admin/Auto, Product Listing Sorter, Redsys payment module...

  2. #62
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    253
    Plugin Contributions
    0

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Hi torvista,
    Many thank for the feedback. Yes, I am using your Master from Github, from 9 May 2019 when I look at my download history. Sorry, I did not update the download and installation, finally got around to entering the Admin constants after getting more or less up to speed on what they all do, among other things.
    1. So that is how it works. Cool! I will keep that in mind, and do stuff in English for now, then look at adding Japanese later on (this is for address information, shop name, etc.).
    The output does not get garbled as such, it is written as unicode character codes (\u....\u....) rather than the actual characters. I will put one up shortly so you can see. It was the address information I had wanted to put in Japanese primarily since I am in Tokyo. But it seems English is always acceptable to Google, as far as I could tell from reading, so I do not think I am losing out practically.

    2. Thanks. I don't think this has anything to do with the plugin, after all if FB says it gets a 404 for a URL with quesry string, that is simply a non-starter. Twitter and Google have no trouble though.
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  3. #63
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    253
    Plugin Contributions
    0

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Hi torvista,
    I do not know why, but now, the UTF-8 appears fine when I set it in Japanese characters!
    However, one other item, "Home", in the bottom line, is odd when it is displayed in Japanese language.

    Here is the extract for JSON for the home page, when the site is viewed in English:
    Code:
                "@type": "PostalAddress",
       "streetAddress" : "牟礼2-11-24-304",
      "addressLocality": "三鷹市",
        "addressRegion": "東京都",
           "postalCode": "181-0002",
      "addressCountry" : "JP"
                     }
    }
    </script>
    <script type="application/ld+json" title="schemaBreadcrumb">
    {
           "@context": "http://schema.org",
              "@type": "BreadcrumbList",
    "itemListElement": [
      {
          "@type": "ListItem",
       "position": 1,
           "item": {
               "@id": "https://www.proteawines.jp/shop/index.php?main_page=index",
              "name": "Home"
                   }
    Here is the extract for JSON for the home page, when the site is viewed in Japanese:
    Code:
                "@type": "PostalAddress",
       "streetAddress" : "牟礼2-11-24-304",
      "addressLocality": "三鷹市",
        "addressRegion": "東京都",
           "postalCode": "181-0002",
      "addressCountry" : "JP"
                     }
    }
    </script>
    <script type="application/ld+json" title="schemaBreadcrumb">
    {
           "@context": "http://schema.org",
              "@type": "BreadcrumbList",
    "itemListElement": [
      {
          "@type": "ListItem",
       "position": 1,
           "item": {
               "@id": "https://www.proteawines.jp/shop/index.php?main_page=index",
              "name": "\u30db\u30fc\u30e0"
                   }
    The last entry, for "name" is Japanese katakana characters "ホーム", the translation of "Home". All my files are UTF-8, as far as I know, and so is the database (again, as far as I know).

    I know I saw the address also in the same format earlier, since I particularly took note of the streetAddress having \u...\u...2-11-24-304, and similarly with the addressLocality (city) and addressRegion (prefecture). Maybe I had not see addressCountry correctly yet (I initially had it as 日本, i.e. "Japan" in Japanese, rather than the 2-letter code).
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  4. #64
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    253
    Plugin Contributions
    0

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Hi torvista,
    I did a quick check again on FB URLs.

    For main page, no problems
    1. https://www.proteawines.jp/shop/inde...ain_page=index
    2. https://www.proteawines.jp/shop/inde...ex&language=ja

    Then, for category pages, again, no problem:
    1. https://www.proteawines.jp/shop/inde...index&cPath=82
    Although FB does note that "&" in the URL does not match the URI-escaped version in the og:url property.
    Code:
    <meta property="og:url" content="https://www.proteawines.jp/shop/index.php?main_page=index&amp;amp;cPath=82" />
    For product pages, this is where FB returns a 404.
    1. https://www.proteawines.jp/shop/inde...roducts_id=188
    Here the og:url property is missing the category!
    Code:
    <meta property="og:url" content="https://www.proteawines.jp/shop/index.php?main_page=product_info&amp;amp;products_id=188" />
    I don't know if this is an issue with how I set up the plugin, or if this looks like a bug?
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  5. #65
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    253
    Plugin Contributions
    0

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Hi torvista,
    I looked at your page and say you had actually updated your plugin in 2020. As I wrote, I installed yours on 9th May 2019. So I am missing the two below updates you made post that date:
    2020 03 27 - torvista Added the option of creating an anonymous, blank review with an admin-defined star-rating for products with no review at all, in an attempt to stop hundreds of warnings: Missing field "aggregateRating" Missing field "review" Remains to be seen if results in further warnings. 2020 02 25 - torvista changed array declarations to short syntax changed while to a foreach 2020 02 11 - torvista fixed double encoding ampersands. general revision for strict mode/EA inspection recommendations 2019 06 18 - torvista for php notices: facebook reviews code to only run on a product page. 2019 05 08 - torvista added schema: priceValidUntil Used last day of the year. added schema: SKU sku, mpn, ProductID all use the same products_model. Misc Moved fields around to mirror Google Structured Data Tool example. Edited the layout spacing for better visual presentation.

    Bugfix Improved cleaning of product description for schema (line feeds, carriage returns, extra spaces). meta property="og:description" was always using Meta Tag description instead of category description when defined.
    I will try to install the newest code and test again.
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  6. #66
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    253
    Plugin Contributions
    0

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Ah, unfortunately no change with the new jscript_plugin_structured_data.php, which is the only file that appears to have changed, according to my diff between 9 May 2019 and 4 May 2020 downloads.
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  7. #67
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    253
    Plugin Contributions
    0

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    I might as well send you the entire current JSON content for the example product page.
    By default it displays in Japanese, so you can see what UTF-8 characters end up escaped to character codes.

    Notes:
    1. schemaOrganisation seems fine, just takes the direct input from Admin screen settings, which in my case is Japanese in UTF-8.
    2. schemaBreadcrumb, schemaProduct, seems to escape the original Zen Cart Japanese in UTF-8 to ASCII, so no UTF-8 characters, as well as URI-encoding.
    3. Facebook and Twitter properties seem to keep the original Zen Cart Japanese in UTF-8 just fine.
    4. Google schema url, and the Facebook, Twitter product property URLs are all missing the category ("cPath") part.
    5. However, both Google and Twitter find the product page in the debugger, even though the JSON URL is wrong! Facebook however does not.

    https://www.proteawines.jp/shop/inde...roducts_id=188
    Code:
    <script title="Structured Data: schemaOrganisation" type="application/ld+json">
    {
         "@context": "http://schema.org",
            "@type": "Organization",
              "url": "https://www.proteawines.jp",
             "logo": "https://www.proteawines.jp/img/webshop/schemaLogo.jpg",
    "contactPoint" : [{
                "@type" : "ContactPoint",
            "telephone" : "090-1616-1493",
          "contactType" : "customer service",
    "availableLanguage" : "japanese,english"
                      }],
          "sameAs" : ["https://www.facebook.com/proteawinesjapan/",
    "https://twitter.com/AkiHassenpflug",
    "https://www.proteawines.jp/shop/index.php?main_page=contact_us"
                     ],
       "legalName" : "Protea Wines Japan",
           "email" : "southafrica.wines.japan######################",
          "address": {
                "@type": "PostalAddress",
       "streetAddress" : "牟礼2-11-24-304",
      "addressLocality": "三鷹市",
        "addressRegion": "東京都",
           "postalCode": "181-0002",
      "addressCountry" : "JP"
                     }
    }
    </script>
    <script title="Structured Data: schemaBreadcrumb" type="application/ld+json">
    {
           "@context": "http://schema.org",
              "@type": "BreadcrumbList",
    "itemListElement": [
          {
          "@type": "ListItem",
       "position": 1,
           "item": {
               "@id": "https://www.proteawines.jp/shop/index.php?main_page=index",
              "name": "\u30db\u30fc\u30e0"
                   }
           },
          {
          "@type": "ListItem",
       "position": 2,
           "item": {
               "@id": "https://www.proteawines.jp/shop/index.php?main_page=index&amp;cPath=82",
              "name": "\u30d5\u30a9\u30fc\u30eb\u30b9\u30d9\u30a4\u30f4\u30a3\u30f3\u30e4\u30fc\u30c9"
                   }
           },
          {
          "@type": "ListItem",
       "position": 3,
           "item": {
               "@id": "https://www.proteawines.jp/shop/index.php?main_page=product_info&amp;cPath=82&amp;products_id=188",
              "name": "\u30d5\u30a9\u30fc\u30eb\u30b9\u30d9\u30a4 \u3000\u30aa\u30fc\u30eb\u30c9\u30b9\u30af\u30fc\u30eb\u3000\u30b7\u30e9\u30fc 2017"
                   }
           }
                        ]
    }
    </script>
    <script title="Structured Data: schemaProduct" type="application/ld+json">
    {   "@context": "https://schema.org",
          "@type": "Product",
           "name": "\u30d5\u30a9\u30fc\u30eb\u30b9\u30d9\u30a4 \u3000\u30aa\u30fc\u30eb\u30c9\u30b9\u30af\u30fc\u30eb\u3000\u30b7\u30e9\u30fc 2017",
          "image": "https://www.proteawines.jp/shop/images/false_bay/False-Bay-Vineyards-Old-School-Syrah-2017.jpg",
    "description": "\u30d8\u30eb\u30c0\u30fc\u30d0\u30fc\u30b0\u8fd1\u304f\u306e\u30d0\u30a4\u30aa\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u8fb2\u696d\u3092\u884c\u3063\u3066\u3044\u308b\u30a6\u30a9\u30fc\u30bf\u30fc\u30af\u30eb\u30fc\u30d5\u30ef\u30a4\u30ca\u30ea\u30fc\u306b\u62e0\u70b9\u3092\u7f6e\u304fFalse Bay Vineyards\u306e\u30d5\u30a9\u30fc\u30eb\u30b9\u30d9\u30a4\u30ec\u30f3\u30b8\u3002\u3053\u306e\u30d6\u30e9\u30f3\u30c9\u306f\u3001\u300c\u672c\u7269\u306e\u30ef\u30a4\u30f3 \u300d \u3092\u624b\u3054\u308d\u306a\u4fa1\u683c\u306b\u3057\u305f\u3044\u3068\u3044\u3046\u9858\u671b\u304b\u3089\u751f\u307e\u308c\u307e\u3057\u305f\u3002 \u91ce\u751f\u306e\u9175\u6bcd\u767a\u9175\u3001\u9178\u6dfb\u52a0\u306a\u3057&hellip;\u3053\u306e\u30d6\u30e9\u30f3\u30c9\u3067\u306f\u3001\u307e\u3055\u306b\u3053\u306e\u7279\u5fb4\u3092\u4eba\u9593\u306e\u624b\u3067\u3054\u307e\u304b\u3055\u305a\u306b\u3067\u304d\u308b\u304b\u304e\u308a\u30d4\u30e5\u30a2\u306b\u8868\u3057\u307e\u3059\u3002\u8461\u8404\u304c\u53e4\u3044\u3068\u3001\u81ea\u7136\u3068\u5730\u57df\u306b\u5408\u3046\u30d0\u30e9\u30f3\u30b9\u306e\u53d6\u308c\u305f\u91ce\u751f\u9175\u6bcd\u304c\u65e2\u306b\u3042\u308b\u306e\u3067\u3001\u81ea\u7136\u306e\u9175\u6bcd\u3068\u3001\u30aa\u30fc\u30ac\u30cb\u30c3\u30af\u3068\u30d0\u30a4\u30aa\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u306e\u8fb2\u696d\u306e\u3084\u308a\u65b9\u3067\u305d\u306e\u571f\u5730\u306e\u8461\u8404\u306e\u3001\u81ea\u7136\u306e\u500b\u6027\u3092\u30ef\u30a4\u30f3\u3067\u8868\u73fe\u3057\u307e\u3059\u3002\u4eca\u65e5\u3067\u3082\u3001\u3053\u306e\u3088\u3046\u306a\u4fa1\u683c\u6c34\u6e96\u3067\u30ef\u30a4\u30f3\u3092\u88fd\u9020\u3059\u308b\u3053\u3068\u306f\u307b\u3068\u3093\u3069\u524d\u4f8b\u306e\u306a\u3044\u3053\u3068\u3067\u3059\u3002\u6728\u82fa\u3001\u30ab\u30b7\u30b9\u3001\u30d6\u30e9\u30c3\u30af\u30c1\u30a7\u30ea\u30fc\u306e\u4e0a\u54c1\u306a\u9999\u308a\u3002\u7a4f\u3084\u304b\u306a\u6e0b\u307f\u3068\u82b3\u9187\u306a\u9577\u3044\u4f59\u97fb\u3002\u304a\u8089\u6599\u7406\u3001\u30ab\u30ec\u30fc\u3001\u30c8\u30de\u30c8\u6599\u7406\u3001\u30d3\u30fc\u30d5\u30b7\u30c1\u30e5\u30fc\u306a\u3069\u306b\u3002\u5730\u57df\u8a73\u7d30\uff1a\u751f\u7523\u5730\uff1a\u5357\u30a2\u30d5\u30ea\u30ab\u53ce\u7a6b\u5730\uff1a\u30b9\u30c6\u30ec\u30f3\u30dc\u30c3\u30b7\u30e5\u5730\u533a\u5546\u54c1\u306e\u8a73\u7d30\uff1a\u54c1\u7a2e\uff1a\u30b7\u30e9\u30fc 100\uff05\u30d3\u30f3\u30c6\u30fc\u30b8\uff1a2017\u5e74\u30a2\u30eb\u30b3\u30fc\u30eb\u5ea6\u6570\uff1a13.63\uff05\u6b8b\u7cd6\u5ea6\uff1a2.6 g\/l\u6ef4\u5b9a\u9178\u5ea6\uff1a5.8 g\/l\u9178\u5ea6\uff1a3.57\u5473\uff1a\u8f9b\u53e3\u30dc\u30c7\u30a3\uff1a\u30d5\u30eb\u30d1\u30f3\u30d5\u30ec\u30c3\u30c8\u3068\u30c6\u30fc\u30b9\u30c6\u30a3\u30f3\u30b0\u30ce\u30fc\u30c8\uff1aPDF\u30d5\u30a1\u30a4\u30eb",
            "sku": "FBV0006",
            "mpn": "FBV0006",
          "brand": "False Bay Vineyards",
      "productID": "FBV0006",
         "offers": {
                    "@type" : "Offer",
                       "url": "https://www.proteawines.jp/shop/index.php?main_page=product_info&amp;products_id=188",
            "priceCurrency" : "JPY",
                    "price" : "1309",
          "priceValidUntil" : "2020-12-31",
            "itemCondition" : "http://schema.org/NewCondition",
             "availability" : "http://schema.org/InStock",
                   "seller" : "Protea Wines Japan",
         "deliveryLeadTime" : "1",
                 "category" : "\u30d5\u30a9\u30fc\u30eb\u30b9\u30d9\u30a4\u30f4\u30a3\u30f3\u30e4\u30fc\u30c9",
              "itemOffered" : "\u30d5\u30a9\u30fc\u30eb\u30b9\u30d9\u30a4 \u3000\u30aa\u30fc\u30eb\u30c9\u30b9\u30af\u30fc\u30eb\u3000\u30b7\u30e9\u30fc 2017",
           "eligibleRegion" : "JP",
    "acceptedPaymentMethod" : {
                      "@type" : "PaymentMethod",
                       "name" : ["http://purl.org/goodrelations/v1#ByBankTransferInAdvance",
    "http://purl.org/goodrelations/v1#ByInvoice",
    "http://purl.org/goodrelations/v1#Cash",
    "http://purl.org/goodrelations/v1#CheckInAdvance",
    "http://purl.org/goodrelations/v1#COD",
    "http://purl.org/goodrelations/v1#DirectDebit",
    "http://purl.org/goodrelations/v1#GoogleCheckout",
    "http://purl.org/goodrelations/v1#PayPal",
    "http://purl.org/goodrelations/v1#PaySwarm",
    "http://purl.org/goodrelations/v1#AmericanExpress",
    "http://purl.org/goodrelations/v1#DinersClub",
    "http://purl.org/goodrelations/v1#Discover",
    "http://purl.org/goodrelations/v1#JCB",
    "http://purl.org/goodrelations/v1#MasterCard",
    "http://purl.org/goodrelations/v1#VISA"]
                              }
                   }
    }
    </script>
    <!-- Facebook structured data general-->
    <meta property="fb:app_id" content="879695509096293" />
    <meta property="fb:admins" content="https://www.facebook.com/akika0803" />
    <meta property="og:title" content="Protea Wines Japan - フォールスベイ  オールドスクール シラー 2017" />
    <meta property="og:site_name" content="Protea Wines Japan" />
    <meta property="og:url" content="https://www.proteawines.jp/shop/index.php?main_page=product_info&amp;products_id=188" />
    <meta property="og:locale" content="" />
    <meta property="og:locale:alternate" content="" />
    <meta property="og:image" content="https://www.proteawines.jp/shop/images/false_bay/False-Bay-Vineyards-Old-School-Syrah-2017.jpg" />
    <meta property="og:image:url" content="https://www.proteawines.jp/shop/images/false_bay/False-Bay-Vineyards-Old-School-Syrah-2017.jpg" />
    <meta property="og:image:type" content="image/jpeg" />
    <meta property="og:image:width" content="800" />
    <meta property="og:image:height" content="800" />
    <meta property="og:description" content="ヘルダーバーグ近くのバイオダイナミック農業を行っているウォータークルーフワイナリーに拠点を置くFalse Bay Vineyardsのフォールスベイレンジ。このブランドは、「本物のワイン 」 を手ごろな価格にしたいという願望から生まれました。 野生の酵母発酵、酸添加なし&hellip;このブランドでは、まさにこの特徴を人間の手でごまかさずにできるかぎりピュアに表します。葡萄が古いと、自然と地域に合うバランスの取れた野生酵母が既にあるので、自然の酵母と、オーガニックとバイオダイナミックの農業のやり方でその土地の葡萄の、自然の個性をワインで表現します。今日でも、このような価格水準でワインを製造することはほとんど前例のないことです。木苺、カシス、ブラックチェリーの上品な香り。穏やかな渋みと芳醇な長い余韻。お肉料理、カレー、トマト料理、ビーフシチューなどに。地域詳細:生産地:南アフリカ収穫地:ステレンボッシュ地区商品の詳細:品種:シラー 100%ビンテージ:2017年アルコール度数:13.63%残糖度:2.6 g/l滴定酸度:5.8 g/l酸度:3.57味:辛口ボディ:フルパンフレットとテースティングノート:PDFファイル" />
        <!-- Facebook structured data for product-->
    <meta property="og:type" content="og:product" />
    <meta property="product:availability" content="instock" />
    <meta property="product:brand" content="False Bay Vineyards" />
    <meta property="product:category" content="フォールスベイヴィンヤード" />
    <meta property="product:condition" content="new" />
    <meta property="product:mfr_part_no" content="FBV0006" />
    <meta property="product:price:amount" content="1309" />
    <meta property="product:price:currency" content="JPY" />
    <meta property="product:product_link" content="https://www.proteawines.jp/shop/index.php?main_page=product_info&amp;products_id=188" />
    <meta property="product:retailer" content="879695509096293" />
    <meta property="product:retailer_category" content="フォールスベイヴィンヤード" />
    <meta property="product:retailer_part_no" content="FBV0006" />
    <!-- eof Facebook structured data -->
    <!-- Twitter Card markup -->
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:site" content="@AkiHassenpflug" />
    <meta name="twitter:title" content="Protea Wines Japan - フォールスベイ  オールドスクール シラー 2017" />
    <meta name="twitter:description" content="ヘルダーバーグ近くのバイオダイナミック農業を行っているウォータークルーフワイナリーに拠点を置くFalse Bay Vineyardsのフォールスベイレンジ。このブランドは、「本物のワイン 」 を手ごろな価格にしたいという願望から生まれました。 野生の酵母発酵、酸添加なし&hellip;このブランドでは、まさにこの特徴を人間の手でごまかさずにできるかぎりピュアに表します。葡萄が古いと、自然と地域に合うバランスの取れた野生酵母が既にあるので、自然の酵母と、オーガニックとバイオダイナミックの農業のやり方でその土地の葡萄の、自然の個性をワインで表現します。今日でも、このような価格水準でワインを製造することはほとんど前例のないことです。木苺、カシス、ブラックチェリーの上品な香り。穏やかな渋みと芳醇な長い余韻。お肉料理、カレー、トマト料理、ビーフシチューなどに。地域詳細:生産地:南アフリカ収穫地:ステレンボッシュ地区商品の詳細:品種:シラー 100%ビンテージ:2017年アルコール度数:13.63%残糖度:2.6 g/l滴定酸度:5.8 g/l酸度:3.57味:辛口ボディ:フルパンフレットとテースティングノート:PDFファイル" />
    <meta name="twitter:image" content="https://www.proteawines.jp/shop/images/false_bay/False-Bay-Vineyards-Old-School-Syrah-2017.jpg" />
    <meta name="twitter:image:alt" content="フォールスベイ  オールドスクール シラー 2017" />
    <meta name="twitter:url" content="https://www.proteawines.jp/shop/index.php?main_page=product_info&amp;amp;products_id=188" />
    <meta name="twitter:domain" content="https://www.proteawines.jp" />
    <!-- eof Twitter Card markup -->
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  8. #68
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    253
    Plugin Contributions
    0

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Hi torvista,
    I did some more checks, and unfortunately it looks like the problem lies in the htmlentities() function acting on $canonicalLink.
    According to
    https://www.zen-cart.com/showthread....not-working-on
    $canonicalLink is defined in
    /includes/init_includes/init_canonical.php
    and output in
    /includes/templates/<MYTEMPLATE>/common/html_header.php
    The definition file includes the following:
    Code:
    / cPath is excluded by default
     $includeCPath = FALSE;
    That being the default, it explains why the URL excludes the cPath element.
    I also found the explanation of why cPath is not included in the original announcement of init_canonical.php:
    https://www.zen-cart.com/showthread....al-URL-Support

    But worrisome is that the resulting URL generated by the plugin is invalid, even in my browser.
    So I checked:

    1. For categories there is no problem.
    Original URL:
    https://www.proteawines.jp/shop/inde...index&cPath=82
    Plugin-generated version also works:
    https://www.proteawines.jp/shop/inde...p;amp;cPath=82

    2. For products, there is a problem.
    Original URL:
    https://www.proteawines.jp/shop/inde...roducts_id=188
    Stripping out cPath manual to give canonical URL, still works:
    https://www.proteawines.jp/shop/inde...roducts_id=188
    But the plugin-generated version does not work:
    https://www.proteawines.jp/shop/inde...roducts_id=188

    So "&" converted to "&amp;amp;" for categories works, but not so for products. Very odd!
    I also re-iterate that while my browser (Firefox) and Facebook's debugger cannot handle this generated URL, Google and Twitter were able to somehow make sense of it in their debuggers and show the correct product preview.
    Last edited by gernot; 5 May 2020 at 07:41 AM.
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  9. #69
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    253
    Plugin Contributions
    0

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Hi torvista,
    My eyes are deceiving me... htmlentities() is only used for the Twitter URL, not for the others.
    Still, none of them work in my browser with the "&amp;" or with "&amp;amp;" (htmlentities() merely encodes the "&" again for Twitter).
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  10. #70
    Join Date
    Jul 2012
    Posts
    15,369
    Plugin Contributions
    17

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Quote Originally Posted by gernot View Post
    Hi torvista,
    My eyes are deceiving me... htmlentities() is only used for the Twitter URL, not for the others.
    Still, none of them work in my browser with the "&amp;" or with "&amp;amp;" (htmlentities() merely encodes the "&" again for Twitter).
    Gernot,
    What about if you add the following file to your site:
    includes/extra_configures/patch_clean_ampersands.php
    to have the contents of that file as found at: https://raw.githubusercontent.com/ze...ampersands.php

    Code:
    <?php
    /*
     * Patch GET 20191111
     * 
     * @package initSystem
     * @copyright Copyright 2003-2020 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: patch_clean_ampersands.php New in v1.5.7 $
     */
    /**
     * Suitable for versions of Zen Cart prior to v1.5.7
     *
     * Non-sanitization/access - $_GET
     *
     * Please Note : This file should be placed in includes/extra_configures and will automatically load.
     *  
     */
    
    if (!isset($_GET)) {
        return;
    }
    if (!is_array($_GET)) {
        return;
    }
    foreach ($_GET as $key => $value) {
        if ($key === 'amp;') continue;
        if (strpos($key, 'amp;') !== 0) {
            continue;
        }
        $newtext = substr($key, 4);
        if (isset($_GET[$newtext])) continue;
    
        $_GET[$newtext] = $_GET['amp;' . $newtext];
        unset($_GET['amp;' . $newtext]);
    }
    Does that resolve the issue of not being able to reach the page associated with &amp; being encoded?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

 

 
Page 7 of 10 FirstFirst ... 56789 ... LastLast

Similar Threads

  1. Replies: 13
    Last Post: 27 Jun 2019, 05:31 AM
  2. v150 Contact# structured data markup
    By ShopVille in forum General Questions
    Replies: 9
    Last Post: 12 Nov 2014, 03:01 PM
  3. I want to add Facebook open graph tags
    By stevemax in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Jul 2011, 07:07 PM
  4. Where do I add facebook open graph tags?
    By surlybroad in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 25 May 2011, 04:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR