Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Contact# structured data markup

    Hi all,

    I would like to incorporate structured data for company contacts, as per googles instructions here https://support.google.com/webmasters/answer/4620709

    To which file do i add that?

    TIA!

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    11,314
    Plugin Contributions
    80

    Default Re: Contact# structured data markup

    Using the "base" template provided by Google in the link you provided, you could create the file /includes/templates/YOUR_TEMPLATE/jscript/jscript_contact_markup.js that contains:
    Code:
    <script type="application/ld+json">
    { "@context" : "http://schema.org",
      "@type" : "Organization",
      "url" : "http://www.your-company-site.com",
      "contactPoint" : [
        { "@type" : "ContactPoint",
          "telephone" : "+1-401-555-1212",
          "contactType" : "customer service"
        } ] }
    </script>

  3. #3
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: Contact# structured data markup

    Thanks to i have to add a link pointing to the js file in any other file?

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    11,314
    Plugin Contributions
    80

    Default Re: Contact# structured data markup

    Nope, all you need is that one file. It will be automatically loaded on each page within your store.

  5. #5
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: Contact# structured data markup

    Quote Originally Posted by ShopVille View Post
    Thanks to i have to add a link pointing to the js file in any other file?
    In chrome i don't see it loaded, however a different js file in the same directory does load and i see that file is being referenced in /public_html/includes/templates/YOUR_TEMPLATE/common/html_header.php

    PHP Code:
    <script src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE$current_page_base,'jscript') . '/site_seal.js' ?>" type="text/javascript"></script>

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    11,314
    Plugin Contributions
    80

    Default Re: Contact# structured data markup

    Try it with the "classic" template (temporarily changing to see); it might be a template issue.

  7. #7
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: Contact# structured data markup

    Quote Originally Posted by lat9 View Post
    Try it with the "classic" template (temporarily changing to see); it might be a template issue.
    In this case should i just duplicate that line of code to reference the new js file?

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    11,314
    Plugin Contributions
    80

    Default Re: Contact# structured data markup

    My bad, try naming the file jscript_contact_markup.php and modify the contents to:
    Code:
    <?php
    ?>
    <script type="application/ld+json">
    { "@context" : "http://schema.org",
      "@type" : "Organization",
      "url" : "http://www.your-company-site.com",
      "contactPoint" : [
        { "@type" : "ContactPoint",
          "telephone" : "+1-401-555-1212",
          "contactType" : "customer service"
        } ] }
    </script>

  9. #9
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: Contact# structured data markup

    Quote Originally Posted by lat9 View Post
    My bad, try naming the file jscript_contact_markup.php and modify the contents to:
    Code:
    <?php
    ?>
    <script type="application/ld+json">
    { "@context" : "http://schema.org",
      "@type" : "Organization",
      "url" : "http://www.your-company-site.com",
      "contactPoint" : [
        { "@type" : "ContactPoint",
          "telephone" : "+1-401-555-1212",
          "contactType" : "customer service"
        } ] }
    </script>
    This is what i get in chrom dev tools:

    Uncaught SyntaxError: Unexpected token

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    11,314
    Plugin Contributions
    80

    Default Re: Contact# structured data markup

    Without a link to the site, I can't help further ... except that any "uncaught exception" would be in the Google code example rather than the linking of it into Zen Cart.

 

 

Similar Threads

  1. v154 Installing Super Data Markup, Prices show without tax
    By istilah in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 26 Jun 2019, 04:23 AM
  2. v151 Structured Data plugin?
    By joejoe in forum All Other Contributions/Addons
    Replies: 47
    Last Post: 18 Feb 2017, 06:13 PM
  3. v150 Does V1.5.5a have Google Structured Data tags built in?
    By Johnnycopilot in forum General Questions
    Replies: 3
    Last Post: 13 May 2016, 03:04 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