Move opencart gift voucher

Category: Website

bintecs
Asked:
2013-01-14 8:34 am EST

Hits: 537
Hi
Im a noob to eCommerce and busy building my first opencart shop. Is it possible to to move the Gift voucher link in the footer to my categories menu?

Regards

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

timr_imh
Staff
1,020 Points
2013-01-14 2:14 pm EST
Hello bintecs, and thank you for your question.

The easiest way to get your Gift voucher link up to your top categories menu would be to edit a OpenCart template.

By default you should have a header template file that is building up the menu in the following location:

/catalog/view/theme/default/template/common/header.tpl

If you edit that file around line 93 you can manually put the Gift voucher link into the menu.

You'd want to look for the code in that template file that looks like this:


<div id="menu">
<ul>
<?php foreach ($categories as $category) { ?>
<li><a href="/support/<?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="/support/<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
</div>
<?php } ?>
</li>
<?php } ?>
</ul>



Between the those two lines at the end <?php } ?> and </ul> you'd want to add your link. So it would end up looking like this:


<?php } ?>
<li><a href="/support/./index.php?route=account/voucher">Gift Voucher</a></li>
</ul>



You can make these edits using the File Manager Code Editor in cPanel.

Hope that helps you out, if you're still having any issues getting it to work please let us know.

- Jacob

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!