i try to show different header image in frontend based on store id mean every store has different header image .
the problem is how to echo current store_id in frontend (in header)
so i can proceed with my code something like below :
<?php
if($store_id == '1') { // 1 is default store
//echo image here
}
else { //if not default show different image
//echo image here
}
?>
Opencart version : 1.4.9.6
The current
store_idof Your store is in$this->config->get('config_store_id').That means if You need it in the template, edit header controller (
catalog/controller/common/header.php) – some in theindex()function add this code (id it is not present already):Then in Your
header.tplof Your template (catalog/view/theme/<YOUR_THEME>/template/common/header.tpl) use it this way:or this way:
It is upon You.
EDIT: Also consider moving on with newer OpenCart (latest is 1.5.4.1 as of 15th December, 2012) – it is worth the redesign and the functions and gadgets it has.