/ Published in: PHP
works in produktdetail magento 1.4.2 & 1.5.0.1
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<div class="backtocat"> <?php if ($this->getProduct()->getCategory() != NULL) { $cat = $this->getProduct()->getCategory(); $parent_cat = $cat->getName(); $cat_url = $cat->getUrl() ?> <a href="javascript:history.go(-1)" title="<?php echo $parent_cat;?>"><?php echo $this->__('back to category');?> <?php echo $parent_cat;?></a> <?php } else { ?> <a href="javascript:history.go(-1)" title="back"><?php echo $this->__('Back');?></a> <?php } ?> </div>