Hi, Support,
There is the Color menu item on your Quickstart through which on can change template color, but could you tell me how can one set the template color permanently for the site through the admin interface please? Basically there must be a way of switching colors from the administrator!
Thanks.
10 answers
Hi susanp,
The Jm wall theme does not support to change the theme color in back-end yet, this feature is added for newer themes since the Jm flannel, For the jm wall you have to mofify a little bit in code as following
Open the file of app\design\frontend\default\jm_walltemplate\page\ ja_vars.php you would see this line of code
PHP Code:
$_params->set('jm_color','default');//default, red
you can switch color for your site to other colors, For example red, just change the above to
PHP Code:
$_params->set('jm_color','red');//default, red
I hope it helps !
Hi, Sherlock,
I modified the ja_var.php as you have instructed and set the color to ‘green’, but the website stopped loading all together! I had to restore the code to get the site loading again!
Hi susanp,
You may have done something wrong, can you paste the file’s content here for checking?
Hi, Sherlock,
I re-edited the file in Notepad++ (instead of Notepad), and uploaded it. It now works and the template is set to color green. I then disabled the Color menu items. You can view my two development stores at: http://www.musa-retail.com/, and http://www.musa-wholesale.com/.
Many thanks for your advise.
Susan
Hi susanp,
Great to see your two stores up and running now, let me know which problems still there mate
Hi, Sherlock,
Yes, thanks for your comment. I am also very happy that finally bright daylight can be viewed at the end of the long tunnel of my first but not least(!) Magento project!
I am getting back to you on this thread, as I would like to set the color of the Wholesale store to be different from the Retail. Any ideas how this could be achieved please?
Hi susan,
Sorry for this late !
you can open the file of app\design\frontend\default\jm_walltemplate\page\ ja_vars.php there above this line of code
PHP Code:
$_params->set('jm_color','default');//default, red
you can add this
PHP Code:
$storecode = Mage::app()->getWebsite(true)->getDefaultStore()->getCode();
the $storecode variable store the current store code and now you can add an if statement here to decide which color would be used according the store code, For example
PHP Code:
#Color
if($storecode == "retail"){
$_params->set('jm_color','default');//default, red
}else if($storecode == "wholesale"){
$_params->set('jm_color','red');//default, red
}
I hope you get the ideal !
Hi, Sherlock,
Thanks for your reply. My Store view codes are ‘default’ for the Retail and ‘wholesale’ for the Wholesale, so I have the following lines of code in the program:
Code:
$storecode = Mage::app()->getWebsite(true)->getDefaultStore()->getCode(); if($storecode == "default"){ $_params->set('jm_color','green'); }elseif($storecode == "wholesale"){ $_params->set('jm_color','blue'); }
It still renders color Green however for both stores!
okay Sussan, it’s my mistake there, the code should be
PHP Code:
$storecode = Mage::app()->getStore()->getCode();
if($storecode == "default"){
$_params->set('jm_color','green');
}elseif($storecode == "wholesale"){
$_params->set('jm_color','blue');
}
this would help
Hi, Sherlock,
Thank you very much. It is working now.
This question is now closed