- 產品SKU
<?php echo $this->__('Sku: ') ?></span><?php echo $_product->getSku(); ?>
2.產品詳細圖
$_product_images = Mage::getModel('catalog/product')->load($this->getProduct()->getId())->getMediaGalleryImages();
foreach($_product_images->getItems() as $_product_image) {
echo '<img src="'.Mage::helper('catalog/image')->init($product, 'image', $_product_image->getFile())->resize(500, 500).'" id="galleryimg" style="margin:5px 0;display:block"/>' ;
}
- 分類id
$category->getId()
- 分類頁與產品頁
<?php
$router = $this->getRequest()->getRouteName().'_'.$this->getRequest()->getControllerName().'_'.$this->getRequest()->getActionName();
?>
<?php if($router=="catalog_category_view"||$router=="catalog_product_view"):?>
<title><?php echo 'aaaa '.$this->getTitle().' | aaa.com' ?></title>
<?php else:?>
<title><?php echo $this->getTitle() ?></title>
<?php endif?>
- 下次繼續。。。