Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Rich Snippet Code #233

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/code/core/Mage/Catalog/view/frontend/product/price.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -403,15 +403,15 @@
}
?>
<?php if ($price): ?>
<div class="price-box">
<div class="price-box" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<p<?php if ($showMinPrice): ?> class="minimal-price"<?php endif ?>>
<?php if ($showMinPrice): ?>
<span class="price-label"><?php echo $this->__('Starting at:') ?></span>
<?php endif ?>
<?php if ($_taxHelper->displayBothPrices()): ?>
<span class="price-excluding-tax">
<span class="label"><?php echo $this->helper('Mage_Tax_Helper_Data')->__('Excl. Tax:') ?></span>
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>" itemprop="price">
<?php echo $_coreHelper->currency($_exclTax, true, false) ?>
</span>
</span>
Expand All @@ -428,7 +428,7 @@
$_showPrice = $_exclTax;
}
?>
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>" itemprop="price">
<?php echo $_coreHelper->currency($_showPrice, true, false) ?>
</span>
<?php endif; ?>
Expand Down
6 changes: 3 additions & 3 deletions app/code/core/Mage/Catalog/view/frontend/product/view.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
})(jQuery);
</script>
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
<div class="product-view">
<div class="product-view" itemscope itemtype="http://schema.org/Product">
<div class="product-essential">
<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post"
id="product_addtocart_form"<?php if ($_product->getOptions()): ?>
Expand All @@ -53,7 +53,7 @@

<div class="product-shop">
<div class="product-name">
<h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
<h1 itemprop="name"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
</div>

<?php if ($this->canEmailToFriend()): ?>
Expand Down Expand Up @@ -90,7 +90,7 @@
<h2><?php echo $this->__('Quick Overview') ?></h2>

<div
class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
class="std" itemprop="description"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
</div>
<?php endif;?>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
<p class="product-image product-image-zoom">
<?php
$_img = '<img id="image" src="'.$this->helper('Mage_Catalog_Helper_Image')->init($_product, 'image').'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />';
$_img = '<img id="image" itemprop="image" src="'.$this->helper('Mage_Catalog_Helper_Image')->init($_product, 'image').'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />';
echo $_helper->productAttribute($_product, $_img, 'image');
?>
</p>
Expand All @@ -64,7 +64,7 @@
<?php else: ?>
<p class="product-image">
<?php
$_img = '<img src="'.$this->getBaseImageUrl($_product).'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />';
$_img = '<img itemprop="image" src="'.$this->getBaseImageUrl($_product).'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />';
echo $_helper->productAttribute($_product, $_img, 'image');
?>
</p>
Expand Down