X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How do I add text (https://forum.x-cart.com/showthread.php?t=69382)

limey66 06-15-2014 05:20 AM

How do I add text
 
Can someone tell me how I could add some text to the Header 2 area of my store...right before the Currency flag, see here: http://www.herb-care.com/store/
I want it to say something like "Please select your currency here" to make it a little more obvious that they can choose...

Thanks,

RichieRich 06-15-2014 08:30 AM

Re: How do I add text
 
If it is next to the flag icon, you could go to admin area and open up this file via Content > Edit Templates:

Quote:

/common_files/modules/XMultiCurrency/customer/complex_selector.tpl

Find the line of code where the flag image is which could be on or around line 122.

limey66 06-15-2014 02:16 PM

Re: How do I add text
 
Hi...
Thx for replying...I tried what you said but the text appears after the flag and pushes everything down below the coloured header containing the Flag and Currency .. I tried putting in before the text and it appears on the left side on top of the search stuff...I need the text to be in the colored bar just before the flag...

RichieRich 06-15-2014 02:23 PM

Re: How do I add text
 
can you post the template code for this template you have for your version and where you are putting the text.

It could need some kind of css element, but it should be possible

limey66 06-15-2014 02:35 PM

Re: How do I add text
 
Here's the code... I was trying to add it around line 123 and a couple of other places in between 100 and 123..
The code I was trying to add is:
<p><strong>Please select your currency here:</strong></p>



{*
35ccba99f029d181b26817f94fc451d1144a0e0e, v5 (xcart_4_6_2), 2014-01-23 12:32:45, complex_selector.tpl, aim
vim: set ts=2 sw=2 sts=2 et:
*}

{if not $x_mc_hide_currency_selector}
<script type="text/javascript">
//<![CDATA[

var lng_mc_selector_title = '{$lng.mc_lbl_selector_title}';
var lng_thumbnails = [
{foreach from=$all_languages item=l}
['{$l.code}', '{if not $l.is_url}{$current_location}{/if}{$l.tmbn_url}'],
{/foreach}
['empty', '']
];

var mc_countries = [
{foreach from=$mc_all_countries item=cnt}
{if not $cnt.excluded}
['{$cnt.country_code}', '{$cnt.currency_code}', '{$cnt.language_code}'],
{/if}
{/foreach}
];
{literal}

function toggleSelectorDlg(base, linesCount)
{
$('#mc-selector-language-block-menu').hide();
x = $(base).offset().left;
y = $(base).offset().top;
var at = 'left+' +x + ' top+'+y;
_minHeight = 55 + linesCount * 52;
$('#mc_selector').dialog({ title: lng_mc_selector_title, position: {my : 'left top', at : at}, width: 550, minWidth: 530, minHeight: _minHeight, draggable: false, modal: true});
}

function getLngThumbnail(code)
{
for (var i = 0; i < lng_thumbnails.length; i++) {
if (lng_thumbnails[i][0] == code) {
return lng_thumbnails[i][1];
}
}
return '';
}

function setCurrencyByCountry(country_code)
{
var currency_code = '';

for (var i = 0; i < mc_countries.length; i++) {
if (mc_countries[i][0] == country_code) {
currency_code = mc_countries[i][1];
break;
}
}

if (currency_code != '') {
$('#mc_currency option[value="' + currency_code + '"]').attr('selected', 'selected');
}
}

function setLanguageByCountry(country_code)
{
var language_code = '';

for (var i = 0; i < mc_countries.length; i++) {
if (mc_countries[i][0] == country_code) {
language_code = mc_countries[i][2];
break;
}
}

if (language_code != '') {
$('#mc-selected-language').val(language_code);
$('#mc-selector-language-current').css('backgroundImage', $('#mc-selector-language-block-menu-item-' + language_code).css('backgroundImage'));
$('#mc-selector-language-current').html($('#mc-selector-language-block-menu-item-' + language_code).html());
}
}


{/literal}

//]]>
</script>

{foreach from=$all_languages item=l name=languages}
{if $store_language eq $l.code}
{if $config.Appearance.line_language_selector eq 'Y'}
{assign var="cur_lng_dspl" value=$l.code3}
{elseif $config.Appearance.line_language_selector eq 'A'}
{assign var="cur_lng_dspl" value=$l.code}
{elseif $config.Appearance.line_language_selector eq 'L'}
{assign var="cur_lng_dspl" value=$l.language}
{/if}
{assign var="curlng" value=$l}
{/if}
{/foreach}

{assign var="mc_selector_lines" value=0}
{if $smarty.foreach.languages.total gt 1}
{math assign="mc_selector_lines" equation="x+1" x=$mc_selector_lines}
{/if}
{if $mc_allow_currency_selection}
{math assign="mc_selector_lines" equation="x+1" x=$mc_selector_lines}
{/if}
{if $config.mc_allow_select_country eq "Y"}
{math assign="mc_selector_lines" equation="x+1" x=$mc_selector_lines}
{/if}

<div class="languages mc-selector-menu-block" id="mc-selector-menu" {if $smarty.foreach.languages.total gt 1 or $mc_allow_currency_selection}onclick="javascript: toggleSelectorDlg(this, {$mc_selector_lines})"{else}style="cursor: auto;" {/if}>

<div class="mc-selector-menu-item">

{if $config.Appearance.line_language_selector eq 'F'}
<img src="{if not $curlng.is_url}{$current_location}{/if}{$curlng.tmbn_url|amp}" alt="{$curlng.language|escape}" width="{$curlng.image_x}" height="{$curlng.image_y}" title="{$lng.lbl_language|escape}: {$curlng.language|escape}" />

{else}
<strong class="language-code lng-{$store_language}" title="{$lng.lbl_language|escape}: {$curlng.language|escape}">'{$cur_lng_dspl}'</strong>
{/if}

</div>

<div class="mc-selector-menu-item" title="{$lng.mc_lbl_currency|escape}: {$store_currency_data.name|escape}">{$store_curren cy}{if $store_currency_data.symbol ne "" and $store_currency ne $store_currency_data.symbol} ({$store_currency_data.symbol}){/if}</div>

{if $config.mc_allow_select_country eq "Y"}
{assign var="store_country_name" value="country_`$store_country`"}
<div class="mc-selector-menu-item" title="{$lng.lbl_country|escape}: {$lng.$store_country_name|escape}">{$lng.$store_co untry_name}</div>
{/if}

</div>

<div class="mc-selector-popup-block" id="mc_selector">

<form action="home.php" method="get" id="mcselectorform">

<ul class="mc-selector-block">

{* Language selector *}

{if $smarty.foreach.languages.total gt 1}

<li class="mc-selector-row mc-selector-language-row">
<input type="hidden" name="sl" value="{$store_language}" id="mc-selected-language" />
<div class="mc-selector-label">{$lng.lbl_select_language}:</div>

{capture name="curlangdlg"}
{foreach from=$all_languages item=l}
{if $store_language eq $l.code}{assign var="mc_current_language" value=$l.language}{/if}
<div class="mc-selector-language-block-menu-item" id="mc-selector-language-block-menu-item-{$l.code}" style="background-image: url({if not $l.is_url}{$current_location}{/if}{$l.tmbn_url|amp});" onclick="javascript: $('#mc-selected-language').val('{$l.code}'); $('#mc-selector-language-current').css('backgroundImage', $(this).css('backgroundImage')); $('#mc-selector-language-current').html($(this).html()); $('#mc-selector-language-block-menu').hide();">{$l.language}</div>
{/foreach}
{/capture}

<span class="mc-selector-language-current" id="mc-selector-language-current" style="background-image: url({if not $curlng.is_url}{$current_location}{/if}{$curlng.tmbn_url|amp});" onclick="javascript: $('#mc-selector-language-block-menu').css('left', $(this).position().left); $('#mc-selector-language-block-menu').toggle();">{$mc_current_language}</span>

<div class="mc-selector-language-block-menu" id="mc-selector-language-block-menu">
{$smarty.capture.curlangdlg}
</div>

</li>

{/if}

{* Currency selector *}

{if $mc_allow_currency_selection}

<li class="mc-selector-row">

{if $smarty.foreach.languages.total gt 1}
<div class="mc-selector-row-separator"></div>
{/if}

<div class="mc-selector-label">{$lng.mc_lbl_select_surrency}:</div>
<select name="mc_currency" id="mc_currency">
{foreach from=$mc_all_currencies item=cur}
<option value="{$cur.code}"{if $store_currency eq $cur.code} selected="selected"{/if}>{$cur.code} - {$cur.name}</option>
{/foreach}
</select>

</li>

{/if}

{* Country selector *}

{if $config.mc_allow_select_country eq "Y"}

<li class="mc-selector-row">

<div class="mc-selector-row-separator"></div>

<div class="mc-selector-label">{$lng.mc_lbl_select_coountry}:</div>
<select name="mc_country" id="mc_country" onchange="javascript: setCurrencyByCountry($('#mc_country option:selected').val()); setLanguageByCountry($('#mc_country option:selected').val())">
{foreach from=$mc_all_countries item=cnt}
{if not $cnt.excluded}
<option value="{$cnt.country_code}"{if $store_country eq $cnt.country_code} selected="selected"{/if}>{$cnt.country}</option>
{/if}
{/foreach}
</select>
</li>

{/if}

</ul>

<div class="mc-selector-button">
<input type="submit" value="{$lng.lbl_apply}" />
</div>

</form>

</div>
{/if}


All times are GMT -8. The time now is 08:47 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.