Full service web hosting, great prices and support. Starts at $1.99/month!
Results 1 to 10 of 10

Thread: need help with code for Google microdata

  1. #1
    Member
    need help with code for Google microdata


    Join Date
    Dec 2012
    Posts
    95
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    pete54321     $ 20.00
    Rep Power
    16


    1 out of 1 members found this post helpful.

    Default need help with code for Google microdata

    I am using this code to generate microdata:

    <?php
    $pt_manufacturer_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$product_info['manufacturers_id']."'");
    $pt_manufacturer = tep_db_fetch_array($pt_manufacturer_query);?>
    <meta itemprop="manufacturer" content="<?php echo ($pt_manufacturer['manufacturers_name']);?> " />

    After using Googles markup checking utility the microdata for manufacture name isn't showing.

    Could someone look this code and see why it isn't working?

    Thanks in advance!!

  2. #2
    ejsolutions
    Guest


    Lightbulb Re: need help with code for Google microdata

    Check the Page Source in your browser for the content that comes after
    PHP Code:
    <meta itemprop="manufacturer" content=
    Note the use of forum tags to present code.

    Shouldn't need the brackets around
    PHP Code:
    $pt_manufacturer['manufacturers_name'
    but that is just for readability, AFAIK.
    Last edited by ejsolutions; 02-07-2016 at 04:45 PM.

  3. #3
    Member
    need help with code for Google microdata


    Join Date
    Dec 2012
    Posts
    95
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    pete54321     $ 20.00
    Rep Power
    16


    Default Re: need help with code for Google microdata

    Quote Originally Posted by ejsolutions View Post
    Check the Page Source in your browser for the content that comes after
    PHP Code:
    <meta itemprop="manufacturer" content=
    Note the use of forum tags to present code.

    Shouldn't need the brackets around
    PHP Code:
    $pt_manufacturer['manufacturers_name'
    but that is just for readability, AFAIK.
    ejsolutions:

    Thank you for your reply.

    However - I am still at a novice level - can you explain a little more as to what I can do to correct the issue.....Thank You Again!!

  4. #4
    ejsolutions
    Guest


    Thumbs up Re: need help with code for Google microdata

    I have a potential solution for you, in exchange for your product_info.tpl.php

  5. #5
    Member
    need help with code for Google microdata


    Join Date
    Dec 2012
    Posts
    95
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    pete54321     $ 20.00
    Rep Power
    16


    Default Re: need help with code for Google microdata

    Its attached here - Thank You!
    Attached Files Attached Files

  6. #6
    ejsolutions
    Guest


    Default Re: need help with code for Google microdata

    Code:
    $pt_manufacturer_query = tep_db_query("select m.manufacturers_name as manufacturers_name from " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS . " p  where p.products_id = '" . (int)$_GET['products_id'] . "' and p.manufacturers_id = m.manufacturers_id"); 
    $pt_manufacturer = tep_db_fetch_array($pt_manufacturer_query);?> 
    <meta itemprop="manufacturer" content="<?php echo $pt_manufacturer['manufacturers_name'];?> " />

  7. #7
    Member
    need help with code for Google microdata


    Join Date
    Dec 2012
    Posts
    95
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    pete54321     $ 20.00
    Rep Power
    16


    Default Re: need help with code for Google microdata

    Works now!!!!! - Thank you again for your time!!

  8. #8
    ejsolutions
    Guest


    Default Re: need help with code for Google microdata

    Your efforts may well find its way into the core template. I've still to test the rest out and any additions/changes analysed.

  9. #9
    Member
    need help with code for Google microdata


    Join Date
    Dec 2012
    Posts
    95
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    pete54321     $ 20.00
    Rep Power
    16


    Default Re: need help with code for Google microdata

    Quote Originally Posted by ejsolutions View Post
    Your efforts may well find its way into the core template. I've still to test the rest out and any additions/changes analysed.
    Glad to hear that.

    Yes this is only a small piece of what is needed - I am moving on to work on the availability In Stock / Out of Stock. Seems like another challenge...

    Pete

  10. #10
    ejsolutions
    Guest


    Post Re: need help with code for Google microdata

    Had a quick look at the other fields last night. Currencies need fixed up: we don't all live Stateside ya know.
    Also, I'm not sure of the benefits over just using Open Graph tags and whether the microdata should be additional to these.
    Then there's that old chestnut of the categories and how Google wants to impose its' own, on your store. Perhaps use a Product Extra Field for that: Extra Field #6, for Google categories?

    Google marches on, in its' quest to take over the World...

Similar Threads

  1. [Mod Installation] Help with tep_db_query adding Microdata
    By Deckside in forum Custom Mods and Hacks
    Replies: 7
    Last Post: 04-26-2015, 01:29 PM
  2. Zip Code to Postal Code in checkout area / site wide?
    By arioch in forum Templating, CSS, Design
    Replies: 2
    Last Post: 12-17-2012, 02:57 PM
  3. Where to install google adwords code
    By sanashaikh in forum Introduce yourself!
    Replies: 0
    Last Post: 08-30-2008, 01:00 AM
  4. Google Adsense Info Box With GOogle Adverts As Title
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 06-15-2008, 06:26 PM
  5. Google Adsense Info Box With GOogle Adverts As Title
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 06-12-2008, 05:11 PM

Tags for this Thread

Bookmarks

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
  •