And of course I was wrong. For clarity I should say that since I am starting from scratch, I decided to use the template gk_storebox instead of SHop and Buy. I just discovered it is easier to achieve the design I want with it, even though they are very similar.
As per your instructions I went to
- Code: Select all
/templates/gk_shop_and_buy/templateDetails.xml
And there I found this:
- Code: Select all
<field name="template_color" type="list" default="1" label="TPL_GK_LANG_TEMPLATE_COLOR" description="TPL_GK_LANG_TEMPLATE_COLOR_DESC">
<option value="1">TPL_GK_LANG_COLOR_1</option>
<option value="2">TPL_GK_LANG_COLOR_2</option>
<option value="3">TPL_GK_LANG_COLOR_3</option>
To which I added this:
- Code: Select all
<option value="4">TPL_GK_LANG_COLOR_4</option>
Then I went to default.php where I added a line like this:
- Code: Select all
<div id="gkStyleArea">
<a href="#" id="gkColor1"><?php echo JText::_('TPL_GK_LANG_COLOR_1'); ?></a>
<a href="#" id="gkColor2"><?php echo JText::_('TPL_GK_LANG_COLOR_2'); ?></a>
<a href="#" id="gkColor3"><?php echo JText::_('TPL_GK_LANG_COLOR_3'); ?></a>
<a href="#" id="gkColor4"><?php echo JText::_('TPL_GK_LANG_COLOR_4'); ?></a>
</div>
And after that I changed the language file in this manner:
- Code: Select all
TPL_GK_LANG_COLOR_1="Color I"
TPL_GK_LANG_COLOR_2="Color II"
TPL_GK_LANG_COLOR_3="Color III"
TPL_GK_LANG_COLOR_4="Color IV"
After that, I create a file named 'style4.css' and I uploaded it. However, while I can see COLOR IV listed in the template backend and I can choose it, the front end is still loading style3.css instead of style4.css
I have done a lot of searches all over, but I cannot find anywhere else where any string in this code is mentioned The file is there so I don't know what I could be doing wrong.
To translate it to you furrther instructions it seems I did it right
<option value="foo">Foo color scheme</option>
<option value="4">TPL_GK_LANG_COLOR_4</option>
stylefoo.css
style4.css
The only one that's not clear is your further explanation of:
<option value="_fbar">Bar color scheme</option>
style_bar.css (I think you meant style_fbar.css
But that looks to me like it was simply mistyped.
Why is it not working? To give you full credit, you did say you weren't sure it wouldn't work. But logically I cannot see why. I'll take a look at the other template and see if maybe I can find out from that one since it has more color choices. But if you could ask around I'd be obliged.
Otherwise, I'll have to go back to using styles.
Thank you.