1. Home
  2. Supercash – Sales Booster
  3. Developer
  4. Adding SuperCash Link in Menu / Header

Adding SuperCash Link in Menu / Header

This section is for developers and requires coding understanding.

To add a menu link to the header as shown below


Open header controller file: catalog/controller/common/header.php

Add the following lines in the header file

$this->load->language('extension/module/supercash_common');
$this->load->model('extension/total/cashback_discount');

$data['available_supercash'] = sprintf($this->language->get('supercash_amount'), $this->currency->format($this->model_extension_total_cashback_discount->getTotalAmount(), $this->session->data['currency'])); 
$data['supercash_link'] = $this->url->link('extension/module/supercash');

Open header template file : catalog/view/theme/<your_template_folder>/template/common/header.tpl

Add similar line where you want the menu to appear

<li><a href="<?php echo $supercash_link; ?>"><i class="fa fa-dollar"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $available_supercash; ?></span></a></li>

For header.twig, the code will look something like this

<li><a href="{{ supercash_link }}"><i class="fa fa-dollar"></i> <span class="hidden-xs hidden-sm hidden-md">{{ available_supercash }}</span></a></li>

If you want our support to add the menu for you, an additional $10 will be charged for the work. This will not be covered under free support.

Was this article helpful to you? Yes No

How can we help?