1、修改magento head.phtml模板文件:
getGender();
if($genderCode == 94){
$gender = "female";
}
elseif($gender == 93){
$gender = 'male';
}
else{
$gender = 'unisex';
}
?>
getStore()->getStoreId();
Mage::getModel('review/review')->getEntitySummary($product,$storeId);
$rating = $product->getRatingSummary(); //product rating object
?>
2、产品详情页catalog/product/view.phtml
helper('catalog/output'); ?> helper('core');?> getProduct(); ?> formatPrice($_product->getPrice(), false);?> getSku();?> getStore()->getCurrentCurrencyCode();?> getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();?> getCategoryIds(); foreach ($_categoryIds as $_categoryId) { $_category = Mage::getModel('catalog/category')->load($_categoryId); $_category_name = $_category->getName(); $_category_url = $_category->getUrlPath(); break; } ?>
productAttribute($_product, $_product->getName(), 'name') ?>
productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?>
3、产品评论页面review/helper/summary.phtml
PS:下面为官方文档的链接地址,有详细的介绍。
https://support.google.com/webmasters/#topic=3309469
https://support.google.com/webmasters/answer/146750?hl=zh-Hans
https://support.google.com/merchants/answer/188494?hl=zh-Hans
https://developers.pinterest.com/rich_pins_product/
https://developers.pinterest.com/rich_pins/validator/
https://developers.pinterest.com/rich_pins_article/
https://developers.facebook.com/docs/sharing/best-practices