Page 4 of 7 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 62
  1. #31
    Join Date
    Nov 2009
    Posts
    6
    Plugin Contributions
    0

    Default 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

    if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes' && strlen($alt)<30) return zenCssButton($image, $alt, 'submit', $sec_class /*, $parameters = ''*/ );
    line 293

    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

    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

    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

    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

    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') {

  2. #32
    Join Date
    Aug 2005
    Location
    San Juan, Puerto Rico
    Posts
    1,525
    Plugin Contributions
    9

    Default Re: template switch addon

    Can someone PLEASE, answer my question?
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!
    My contributions: SophyBlue / Sophy Blue-Grey / Mistik / The Bookshelf / Dynamic Sideboxes

  3. #33
    Join Date
    Apr 2004
    Location
    vienna
    Posts
    198
    Plugin Contributions
    9

    Default 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;

  4. #34
    Join Date
    Apr 2004
    Location
    vienna
    Posts
    198
    Plugin Contributions
    9

    Default 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)

  5. #35
    Join Date
    Aug 2005
    Location
    San Juan, Puerto Rico
    Posts
    1,525
    Plugin Contributions
    9

    Default Re: template switch addon

    Quote Originally Posted by hugo13 View Post
    @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)
    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).
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!
    My contributions: SophyBlue / Sophy Blue-Grey / Mistik / The Bookshelf / Dynamic Sideboxes

  6. #36
    Join Date
    Nov 2009
    Posts
    6
    Plugin Contributions
    0

    Default Re: template switch addon

    That works perfectly. Thank you very much for the mod and the extra help!

  7. #37
    Join Date
    Apr 2004
    Location
    vienna
    Posts
    198
    Plugin Contributions
    9

    Default 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;
    }

  8. #38
    Join Date
    Aug 2005
    Location
    San Juan, Puerto Rico
    Posts
    1,525
    Plugin Contributions
    9

    Default Re: template switch addon

    Ok, great! I'll give it a try...
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!
    My contributions: SophyBlue / Sophy Blue-Grey / Mistik / The Bookshelf / Dynamic Sideboxes

  9. #39
    Join Date
    Aug 2009
    Posts
    11
    Plugin Contributions
    0

    Default 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

  10. #40
    Join Date
    Jul 2007
    Posts
    2,169
    Plugin Contributions
    16

    Default 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.
    Is your site Upgraded to the current version 1.5.4 Yet?
    zencart-upgrades-website-installation

 

 
Page 4 of 7 FirstFirst ... 23456 ... LastLast

Similar Threads

  1. v151 Title tag on my template pages missing - cannot switch to default template
    By mrcastle in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 6 Aug 2014, 12:00 AM
  2. Lose my template style when I switch to my URL
    By ak6000 in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 19 Jun 2012, 04:30 PM
  3. Template overide/switch for one category
    By Davx in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 12 Sep 2011, 06:15 PM
  4. trying to install and switch to another template
    By sdpamperin in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Sep 2009, 09:32 PM
  5. Fatal Error in UK Switch/Maesto cc_uk addon
    By hutting in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 16 May 2006, 10:02 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR