Hi All
I've searched high and low in both standard forum and VQMOD but cannot seem to find an answer. I want to be able to offer clients the Gift Voucher link as a Category item at the top menu.
is there a way to do this.
Kind regards
Andy
hey There
I managed to do this earlier you have to have some sub categories setup for it to work, as it is I only have one sub cat and it works for me,
In the header.tpl file insert the last line below your code obivously change the domain name... and it should work..
I managed to do this earlier you have to have some sub categories setup for it to work, as it is I only have one sub cat and it works for me,
In the header.tpl file insert the last line below your code obivously change the domain name... and it should work..
Code: Select all
<div id="menu">
<ul>
<?php foreach ($categories as $category) { ?>
<li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
<?php if ($category['children']) { ?>
<div>
<?php for ($i = 0; $i < count($category['children']);) { ?>
<ul>
<?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($category['children'][$i])) { ?>
<li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
<li><a href="http://www.yourdomain.com/index.php?route=checkout/voucher"> Vouchers</a></li>
If you have multiple subcategories the code above will cause "Vouchers" to appear after each subcategory. The correct code is:
Also, note the link to your website's Voucher URL - it's relative. It's better that way. Besides, you can copy and paste the code above without the necessity of any edits.
Cheers
Code: Select all
<ul>
<?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($category['children'][$i])) { ?>
<li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
<?php } ?>
<?php } ?>
<li><a href="/index.php?route=checkout/voucher">Gift Vouchers</a></li>
</ul>
Cheers

Who is online
Users browsing this forum: No registered users and 12 guests