Re: template switch addon
Thank you very much!
I've revised code to alter the look of zencart but have never revised the functional code (except for installing mods) so I better run this by you first to be sure I get it correct.
From includes\functions\html_output.php
line 267
Quote:
if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes' && strlen($alt)<30) return zenCssButton($image, $alt, 'submit', $sec_class /*, $parameters = ''*/ );
line 293
Quote:
if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') return zenCssButton($image, $alt, 'button', $sec_class, $parameters = '');
From includes/templates/template_default/sideboxes - the code referencing IMAGE_USE_CSS_BUTTONS
your line 17, in my file is at line 33
Quote:
if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
From includes/templates/template_default/sideboxes - the code referencing IMAGE_USE_CSS_BUTTONS
your line 16, in my file is at line 31
Quote:
if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
for the above strings, after they have been revised, is this how they should look?
From includes\functions\html_output.php
line 267
Quote:
if (strtolower(UPDATE configuration SET configuration_key = 'IMAGE_USE_CSS_BUTTONS_' WHERE configuration_key = 'IMAGE_USE_CSS_BUTTONS' LIMIT 1;) == 'yes' && strlen($alt)<30) return zenCssButton($image, $alt, 'submit', $sec_class /*, $parameters = ''*/ );
line 293
Quote:
if (strtolower(UPDATE configuration SET configuration_key = 'IMAGE_USE_CSS_BUTTONS_' WHERE configuration_key = 'IMAGE_USE_CSS_BUTTONS' LIMIT 1;) == 'yes') return zenCssButton($image, $alt, 'button', $sec_class, $parameters = '');
From includes/templates/template_default/sideboxes - the code referencing IMAGE_USE_CSS_BUTTONS
your line 17, in my file is at line 33
if (strtolower(UPDATE configuration SET configuration_key = 'IMAGE_USE_CSS_BUTTONS_' WHERE configuration_key = 'IMAGE_USE_CSS_BUTTONS' LIMIT 1;) == 'yes') {
From includes/templates/template_default/sideboxes - the code referencing IMAGE_USE_CSS_BUTTONS
your line 16, in my file is at line 31
if (strtolower(UPDATE configuration SET configuration_key = 'IMAGE_USE_CSS_BUTTONS_' WHERE configuration_key = 'IMAGE_USE_CSS_BUTTONS' LIMIT 1;) == 'yes') {
Re: template switch addon
Can someone PLEASE, answer my question? :cry:
Re: template switch addon
sorry for confusion
1)
you have only to manipulate 1 template file :: includes\templates\YOUR_TEMPLATE\common\main_template_vars.php
if the file does not exist, copy the one from template_default
now add a line with
Code:
if (file_exists(DIR_WS_MODULES . 'pages/' . $current_page_base . '/main_template_vars.php')) {
$body_code = DIR_WS_MODULES . 'pages/' . $current_page_base . '/main_template_vars.php';
} else {
$body_code = $template->get_template_dir('tpl_' . preg_replace('/.php/', '',$_GET['main_page']) . '_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_' . $_GET['main_page'] . '_default.php';
}
// template-switch
define('IMAGE_USE_CSS_BUTTONS', 'no');
2) use zen-cart admin
tools > install sql patches and run
Code:
UPDATE configuration SET configuration_key = 'IMAGE_USE_CSS_BUTTONS_', configuration_title = 'CSS Buttons (functionless)' WHERE configuration_key = 'IMAGE_USE_CSS_BUTTONS' LIMIT 1;
Re: template switch addon
@ideasgirl
look at :: http://demo.zen-cart.at/index.php?ma...id=viennablood
viennablood == the standard german-template; 800px
XAJAX == 1024px & ajax for products
css == zen-cart international = screen wide
hugo13_orange == smarty based template (never finished)
Re: template switch addon
Quote:
Originally Posted by
hugo13
Yes Hugo, but my question goes to "if it fixed" and not fluid. See, your templates (and other I've seen) are with fluid backgrounds (colors and bars) but I haven't seen it with different columns and boxes with different fixed width (which usually you have to change in admin panel).
Re: template switch addon
That works perfectly. Thank you very much for the mod and the extra help!
Re: template switch addon
I think you can do all what you can do with css
look at: http://demo.zen-cart.at/index.php?ma..._switch_id=css
Code:
#navColumnTwo {
width: 111px !IMPORTANT;
}
#templateswitch {
position:absolute;
width:400px !IMPORTANT;
height:15px;
z-index:1;
left: 333px;
top: 77px;
}
#categories{
position:absolute;
width:200px !IMPORTANT;
height:15px;
z-index:1;
left: 3px;
top: 77px;
}
Re: template switch addon
Ok, great! I'll give it a try...
Re: template switch addon
Hi there is any way to make this template switcher to do the job automatic every time it detects an iphone browser, it will be great :smartalec:
Re: template switch addon
I have a dumb question. Do i need to upload each template that I plan on using to switch templates, or how does this work. I mean if I going to let my customers pick from 10 different templates do I upload all these? If not this does not work. I can not change from the default template and it is all screwed up. Thank you in advance.