You want rel. easily have a link back from the product view to the category overview, this can be made as follows.
In the
view.phtml
in the folder
app/design/[base or default]/[IhrTemplate]/catalog/product/
The following code is inserted:
<?php if ($_category = $_product->getCategory()): ?> <div class ="back-link"> <a href="<?php echo $_category->getUrl(); ?>" class ="form-button-alt" ><?php echo $this->__('Back') ?></a> </div> <?php endif;?>
I did this, etc according to the description and the additional information but before any cross promotions. made.
The link can then be competent CSS file (häufig styles.css) be defined. Just
.back-link { Your Style Information }
Used in Magento versions 1.5.1.0 and 1.6.1.0. Ask? Comments? Suggestions? Gladly!
Nice solution. Saith, from your point of view anything from a javascript:history.back()?
Have we thought we 🙂 And then we asked ourselves, which speaks for and against this version of the Java. And found: Nothing. But what we think is against the Java version: If you e.g.. from Google or else brought directly to a product, and then uses the Java version Back, etc would be well again to Google. nations. Thus, we have adopted this option.
That's a very good point – I had not thought about… What happens, When a product is assigned to multiple categories? Then the method works well?
So I still have not seen any articles, was displayed in the shop for several categories. So do not like on eBay, where is the level below the other paths. I know it only as, that only one path is displayed. If one does not come through the shop in the article, etc but on Google. it will be probably the only category, which has been indexed by Google and displayed….