Magento – “Back” Link to Article in Category Details

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!

Published by Covos

Since 2009 I have been working intensively with Magento. I started with the creation and operation of B2C stores. This was extended through my work in the logistics sector. This resulted first specialized B2E systems. Today I work day-a day with exciting B2C, B2B- and B2E projects and reports in this blog about challenges and give insider tips.

4 comments on “Magento – “Back” Link to Article in Category Details”

    1. 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.

        1. 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….

Leave a Reply

Your email address will not be published. Required fields are marked *