MSemantic Installation notes:

  1. Install the extension with the extension key from magento connect (remind allowing beta extensions)
  2. Refresh your cache
  3. Logout from backend and re-login
  4. Set the new doctype in your root template and product single view template. This has to be made in the files 1column.phtml, 2colums-left.phtml, 2colums-right.phtml, 3colums.phtml in the folder /page of your template. Remove the doctype declaration and add these 2 lines instead.
  5. <?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "">
  6. Remove the "lang" attribute from the html opening tag so that it looks as follows:
  7. <html xmlns=""  version="XHTML+RDFa 1.0"  xml:lang="<?php echo $this->getLang() ?>">

Your done!

Important - EANs!

For the extension to have the maximum effect in terms of semantic richness, it is very important that you fill in EAN information on product level.

Important - Doctype addendum!

You can use GoodRelations in RDFa in XHTML, HTML5, and HTML4 templates, despite the different state of the standardization of respective DOCTYPEs.
  1. XHTML:
    • Set DOCTYPE to XHTML+RDFa 1.0:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "">
    • Set html version attribute to XHTML+RDFa1.0
      <html xmlns="" version="XHTML+RDFa 1.0">
  2. HTML5
    • Set DOCTYPE to html
      <!DOCTYPE html>
    • Set html version attribute to HTML+RDFa1.1
      <html version="HTML+RDFa 1.1" lang="en">

      Note that is is only a W3C Working Draft at this stage, but should work nonetheless.

  3. Other HTML markup
    • Either use HTML5 recipe or simply set the html version attribute to HTML+RDFa1.1 or XHTML+RDFa1.0. Most clients will extract RDF from this type.
      <html xmlns="" version="XHTML+RDFa 1.0"> or
    • <html version="HTML+RDFa 1.1">
    See also:

Layout Files

  • The extension installs two layout files:
    • app/design/frontend/default/default/template/semantium/dump.phtml
    • app/design/frontend/default/default/layout/msemanticbasic.xml
  • If you are using a custom theme, you'll need to copy these files over to your theme, keeping the folder and naming structures intact. Ones you do this, everything seems to work well.

Proper lastmod attribute in sitemap.xml

Magento has a quite bad habit creating sitemaps: It always puts the current date into the sitemap's lastmod field. This leads to poor crawl rates.

To fix this, follow these steps:

  1. Copy app/code/core/Mage/Sitemap/Model/Sitemap.php to
    /app/code/local/Mage/Sitemap/Model/Sitemap.php (create dirs if necessary)
  2. Edit the category and product section of the second file as follows
  3.  /**
             * Generate categories sitemap
            $changefreq = (string)Mage::getStoreConfig('sitemap/category/changefreq');
            $priority   = (string)Mage::getStoreConfig('sitemap/category/priority');
            $collection = Mage::getResourceModel('sitemap/catalog_category')->getCollection($storeId);
            foreach ($collection as $item) {
                $xml = sprintf('%s%s%s%.1f',
                    htmlspecialchars($baseUrl . $item->getUrl()),
             * Generate products sitemap
            $changefreq = (string)Mage::getStoreConfig('sitemap/product/changefreq');
            $priority   = (string)Mage::getStoreConfig('sitemap/product/priority');
            $collection = Mage::getResourceModel('sitemap/catalog_product')->getCollection($storeId);
            foreach ($collection as $item) {
                $xml = sprintf('%s%s%s%.1f',
                    htmlspecialchars($baseUrl . $item->getUrl()),
  4. (you basically replace the $date vars with the bold strings)
  5. Done! Now watch your crawl rate raise in Google Webmaster Tools.

Configuration Instructions

Basic Settings

  1. Enable -> Yes
  2. Semantic Web Ready Link -> No This controls whether the kind acknowledgment text “Semantic Web - ready thanks to” is being shown as a gratitude for providing the extension for free.

Business Information

Legal Name -> Business name

This should hold the official name of the person or company operating the shop, e.g. “Miller Trading LLC”, even if the Web shop name was “”.

Company Address

Fill in the office address of your company.

Point of Sale Address

POS Available ? => No

Same Pos address as company -> Yes

These two options allow exposing information about a brick-and-mortar store associated with the online shop. If you do not have a regular store, disable “POS”. If the address of the store is the same as the address you entered for the company, check “Yes” for “Same Pos address as company “. Otherwise specify the address of the store.

General Offering Description

Short Description - > Fill in a short description about your offerings.

This is for consumers of the data that try to find a matching shop, not a particular product.

Eligible types of business partners

This indicates the types of audiences you are willing to sell to.

Payment Options

This is for setting the payment options you accept for all items in your shop.

Delivery Methods

This is for setting the delivery options you accept for all items in your shop. Note that if you use DHL or UPS at your discretion (i.e. the customer cannot choose), then it is better to check just “Freight”.

Strong Identifier

Strong Identifier Type -> EANUCC13

This determines the type of strong product identifier published for your items. EAN / UCC_13 / GTIN 13, ISBN13 / UPC are all names for the same identifier.

Only if you are using GTIN8 (“short UPC/EAN”) or long GTIN14 identifiers from the logistics you may want to change this option.

Use Existing Attribute ->

Magento has an existing attribute for product identifiers. If you check “Yes” in here, MSemantic will use that field for publishing EAN/UPC data. If you check “No”, Msemantic will use a proprietary additional attribute, which you will have to maintain for each product then.

Validity of your statement

Validity Period - > 3 months

Valid Through -> tomorrow

With these options, you indicate for how long your offers and prices can be assumed to be valid. Use the longest validity period that you can promise (they can be different for price and offer), because it can be that Google disables showing a price in a rich snippet if the validity period expires before Google will have re-crawled the page with an updated validity interval.

48 hours after the date and time of creating the page is the minimum that works well.