I was wondering is it possible to place de currency drop down menu right next to the language selection in the search box?
If so, how do I do it,
I'm sorry if it's a silly question but I'm just starting to work with this
Thanks,
Joe
This is probably the easiest way I can think of.,,
Open "opencart\catalog\controller\common\header.php" and look for this code:
Code: Select all
$this->children = array(
'common/language',
'common/search'
);
Code: Select all
$this->children = array(
'common/language',
'common/search',
'module/currency'
);
Now open "opencart\catalog\view\theme\default\template\common\header.tpl"
Add this code wherever you want your currency module to appear:
Code: Select all
<?php echo $currency;?>
Now the module should appear in your page when you refresh it... however it is still styled to look like a sidebar module. In order to change it's appearance you'll need to open and edit this file: "opencart\catalog\view\theme\default\template\module\currency.tpl"
Hope that helps, let me know how it works out for you buddy.
-Chris
Anyone else have a different solution to this problem?
PM me for custom OpenCart template design and development.
www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel
Yes, currency is already a sidebox you can enable/disable in the admin. To get language into a sidebox, try this mod:vimal wrote:Is there a way to get currency and language in a sidebox?
Add this to your catalog\controller\common\column_right.php, try adding it just before $this->render();
Code: Select all
$this->children[] ='common/language';
Code: Select all
<div id="column_right">
<?php foreach ($modules as $module) { ?>
<?php echo ${$module['code']}; ?>
<?php } ?>
<div class="box">
<div class="top">Language</div>
<div class="middle"><?php echo $language; ?></div>
<div class="bottom"> </div>
</div>
</div>
Let me know if this works for you.
PM me for custom OpenCart template design and development.
Thanks for the reply. It does work however, I am trying to save some real estate and get language and currency in the same box. Also, I ave 2 languages on the website and hence the div top can't be just "language".
I have got it on top (header) at the moment and really feel currency and language should have its own sidebox called localization or something. I also feel that the header looks too crowded. It looks better with just the logo and search.
www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel
I would surely be a million times thankful to you!
www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel
edit "catalog\controller\module\currency.php" and insert this line before $this->render(); :
Code: Select all
$this->children[] = 'common/language';
Code: Select all
<div class="box">
<div class="top"><img src="catalog/view/theme/default/image/icon_currency.png" alt="" /><?php echo $heading_title; ?></div>
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="currency_form">
<div class="middle" style="text-align: center;">
<select name="currency_code" onchange="$('#currency_form').submit();">
<?php foreach ($currencies as $currency) { ?>
<?php if ($currency['status']) { ?>
<?php if ($currency['code'] == $default) { ?>
<option value="<?php echo $currency['code']; ?>" selected="selected"><?php echo $currency['title']; ?></option>
<?php } else { ?>
<option value="<?php echo $currency['code']; ?>"><?php echo $currency['title']; ?></option>
<?php } ?>
<?php } ?>
<?php } ?>
</select>
<input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
<?php echo $language; ?>
</div>
</form>
<div class="bottom"> </div>
</div>
Code: Select all
$_['heading_title'] = 'Localisation';
Let me know how that works for ya.
PM me for custom OpenCart template design and development.
If I remove the <?php echo $language; ?> from module/currency.tpl, the crrency change works...
Any idea what it could be?
www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel
Code: Select all
<div class="box">
<div class="top"><img src="catalog/view/theme/default/image/icon_currency.png" alt="" /><?php echo $heading_title; ?></div>
<div class="middle" style="text-align: center;">
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="currency_form">
<select name="currency_code" onchange="$('#currency_form').submit();">
<?php foreach ($currencies as $currency) { ?>
<?php if ($currency['status']) { ?>
<?php if ($currency['code'] == $default) { ?>
<option value="<?php echo $currency['code']; ?>" selected="selected"><?php echo $currency['title']; ?></option>
<?php } else { ?>
<option value="<?php echo $currency['code']; ?>"><?php echo $currency['title']; ?></option>
<?php } ?>
<?php } ?>
<?php } ?>
</select>
<input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
</form>
<?php echo $language; ?>
</div>
<div class="bottom"> </div>
</div>
PM me for custom OpenCart template design and development.
www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel
I used your edits to get currency up under Language (have an alignment problem there). However I still have currency (used to be a box) in right column (leftover).
Is it possible for you (or anyone else) to point me in the direction/file that I need to edit in order to get rid of this. I have looked through files "I" thought may need editing but couldn't find anything I recognised.
TIA
christine
Attachments
currency duplication graphic - currency_duplication.JPG (23.37 KiB) Viewed 3228 times
Yea, just go into your admin area and disable the currency module, don't worry it will still show up at the top where you made the mod, but won't appear on the side anymore.cmebd wrote: I used your edits to get currency up under Language (have an alignment problem there). However I still have currency (used to be a box) in right column (leftover).
Is it possible for you (or anyone else) to point me in the direction/file that I need to edit in order to get rid of this. I have looked through files "I" thought may need editing but couldn't find anything I recognised.
Much more importantly, you need to address a HUGE problem with your website design. See here: http://bancomicsans.com/home.html
shame on you!
PM me for custom OpenCart template design and development.
Users browsing this forum: Amazon [Bot] and 64 guests