Thursday 8 January 2015

Magento: Back Button On Product Detail Page

"/app/design/frontend/default/default/template/catalog/product/view.phtml"
path for view.phtml can be diffrent for diffrent magento themes.

and put this code


<?php if ($_category = $_product->getCategory()): ?>

<div class="back-button">
    <button onclick="history.back();" class="button" title="<?php echo $this->__('Back') ?>" type="button">
        <span>
            <span>
<?php echo $this->__('Back') ?></span>
        </span>
    </button>
</div>
<?php endif; ?>

3 comments:

  1. Back button product details in magento is very important programming, and you define this very well. Appreciated, Keep posting.
    gemstone wholesaler in Delhi

    ReplyDelete
  2. Really good to know about the magento back button on product detail. Thanks for sharing this post, keep updating your post.
    tacrolimus tablet

    ReplyDelete