Hi,
I have been looking around but haven't found any solution on this. I would like to put a custom header text on the "banner" module (or find a suitable extension). The idea is that I have a right side banner pane with banners for the events I will take my shop to. I would like to add the text "Meet us at these events" or similar.
I use OC 1.5.6.4 and use multiple languages.
/Fredrik
if you need a quick modification you can use this
catalog/controller/module/module/banner.php
before
add
catalog/model/design/banner.php
before the closing braces '}' of ModelDesignBanner add
catalog/view/theme/theme_name/template/module/banner.tpl
before
add
catalog/controller/module/module/banner.php
before
Code: Select all
$this->data['module'] = $module++;
Code: Select all
$this->data['banners_name'] = array();
foreach ($this->model_design_banner->getBanners() as $result_name) {
$this->data['banners_name'][] = array(
'name' => $result_name['name']
);
}
before the closing braces '}' of ModelDesignBanner add
Code: Select all
public function getBanners() {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner");
return $query->rows;
}
before
Code: Select all
<?php foreach ($banners as $banner) { ?>
Code: Select all
<?php foreach ($banners_name as $banner_name) { ?>
<?php echo $banner_name['name'] == 'HP Products' ? 'Meet us at these events' : ''; ?>
<?php } ?>
You can't control the weather, but you can change your mood.
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
Code: Select all
<?php echo $banner_name['name'] == 'HP Products' ? 'Meet us at these events' : ''; ?>
Meet us at these events = this is your message to the front end. if your banner name is already "Meet us at these events" then replace "HP Products" with "Meet us at these events" or use this code
Code: Select all
<?php echo $banner_name['name'] == 'Meet us at these events' ? $banner_name['name'] : ''; ?>
You can't control the weather, but you can change your mood.
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
Who is online
Users browsing this forum: No registered users and 1 guest