Third times a charm, right? This code works for both regular and specials and passes the Rich Pin validation.
Code:<?php //Schema.org tags ?> <meta property="og:site_name" content="Your Store Name" /> <div itemscope itemtype="http://schema.org/Product"> <meta itemprop="name" content="<?php echo $products_name; ?>" /> <meta itemprop="image" content="<?php echo HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $products_image; ?>" /> <meta itemprop="url" content="<?php echo $canonicalLink; ?>" /> <div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <?php $special_price = $db->Execute("SELECT * from " . TABLE_SPECIALS . " WHERE products_id = '" . (int)$_GET['products_id'] . "' AND status='1'"); if ($special_price->RecordCount() > 0) { ?> <meta itemprop="price" content="<?php echo zen_get_products_special_price($_GET['products_id']) ; ?>" /> <?php }else{ ?> <meta itemprop="price" content="<?php echo zen_get_products_base_price($_GET['products_id']) ; ?>" /> <?php } ?> <meta itemprop="availability" content="in stock" /> <meta itemprop="priceCurrency" content="USD" /> </div> </div> <?php //Schema.org tags ?>


Reply With Quote
