Post by eb_dev » Fri Jan 01, 2010 12:24 am

Hi,

First of all I like to say great work with the shopping cart, i've found it the easiest cart to customise so far and look forward to using it more and more.

I've almost completed the customisation process on my cart but need to add a back button to my sub-categories list, or more specifically a button that goes up one category (providing there is a higher category). I'm listing my main categories along a top nav and my sub-categories in a column below that vertically.

Thanks,

eb_dev

eb_dev


New member

Posts

Joined
Fri Jan 01, 2010 12:11 am

Post by solojuve1897 » Sat Jan 21, 2012 8:19 am

*Bump*

Thread from 2009 with no answer. It's exactly what I'm looking for, but for OpenCart 1.5.1.3

Any help?

Newbie

Posts

Joined
Fri Jun 03, 2011 1:00 am

Post by celestial » Sun Jan 22, 2012 1:41 am

solojuve1897 wrote:*Bump*

Thread from 2009 with no answer. It's exactly what I'm looking for, but for OpenCart 1.5.1.3

Any help?
Place this code where you need:

<div class="buttons">
<div class="right"><a onclick="javascript:history.go(-1)" class="button"><span><?php echo $text_go_back; ?></span></a></div>
</div>

I USE this code in the file catalog\view\theme\default\template\product\category.tpl in this place

<?php if (!$categories && !$products) { ?>
<div class="content">
<?php echo $text_empty; ?>
</div>
<div class="buttons">
<div class="right"><a onclick="javascript:history.go(-1)" class="button"><span><?php echo $text_go_back; ?></span></a></div>
</div>
<?php } else { ?>
<div class="buttons">
<div class="right"><a onclick="javascript:history.go(-1)" class="button"><span><?php echo $text_go_back; ?></span></a></div>
</div>
<?php } ?>


You must define (if multilingual) text_go_back in the language file and controller

catalog\language\english\product\category.php

add
$_['text_go_back'] = 'Go Back';

the same if use others languages.

catalog\controller\product\category\category.php

add

$this->data['text_go_back'] = $this->language->get('text_go_back');

Line 96

Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica


User avatar
Expert Member

Posts

Joined
Sat Mar 20, 2010 4:19 am
Location - Costa Rica

Post by solojuve1897 » Sun Jan 22, 2012 1:45 am

Appreciated!

Works!

Newbie

Posts

Joined
Fri Jun 03, 2011 1:00 am
Who is online

Users browsing this forum: No registered users and 3 guests