I've been doing some reading and following some tutorials to implement structured data / rich snippets code into my store. It's been easy to follow and understand, however now I'm in a situation where I'd like to add my MPN (Manufacturer Part Number) to the feed.

I have successfully added other schema micro data by simply adding to existing div classes. The problem is that I have a box that is negatively affected by using a div class in line.

         <div class="nicebox" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
         <?php echo $this->getTierPriceHtml() ?>
         <?php echo $this->getChildHtml('alert_urls') ?>
         <?php echo $this->getChildHtml('product_type_data') ?>         
         <div class="mpn" itemprop="mpn"><p><?php echo $this->__('MPN: ') ?><?php echo $_product->getData('mpn')?></p></div>
         <p><?php echo $this->__('WEB ID: ') ?><?php echo $_product->getId(); ?></p>

How can I declare an itemprop inline with my code that would not negatively impact the nicebox class?

  • There is an other way to add it by using a custom extension as the most of them does not effect the template, Here is the one I can share - fmeaddons.com/magento/rich-snippets-extension.html
    – user9468
    Commented Dec 11, 2014 at 7:51
  • I have had nothing but problems with FME so I stay away
    – SR_Magento
    Commented Aug 29, 2016 at 17:12

1 Answer 1


Instead of using div try and use a span which should work better inline. Also the class is not required for microdata so you can leave that out


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.