osCmax v2.5 User Manual
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

hard to edit template!

This is a discussion on hard to edit template! within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; hi can any 1 help or teach me how to edit the template? cos i been try out sometime already ...

      
  1. #1
    New Member
    Join Date
    Sep 2006
    Posts
    29
    Rep Power
    0


    Default hard to edit template!

    hi can any 1 help or teach me how to edit the template?
    cos i been try out sometime already still duno how it work

  2. #2
    Member
    Join Date
    Aug 2004
    Posts
    49
    Rep Power
    0


    Default RE: hard to edit template!

    Which template are you using? What are you trying to change?

  3. #3
    New Member
    Join Date
    Sep 2006
    Posts
    29
    Rep Power
    0


    Default Re: RE: hard to edit template!

    Quote Originally Posted by jbanda
    Which template are you using? What are you trying to change?
    well found this template http://osc.template-help.com/10063/index.php
    so thinking follow the layout... i mean the arrangement for the module

    thank you
    jikey

  4. #4
    New Member
    Join Date
    Sep 2006
    Posts
    29
    Rep Power
    0


    Default RE: Re: RE: hard to edit template!

    anyone???? ????

  5. #5
    Member
    Join Date
    Apr 2006
    Posts
    39
    Rep Power
    0


    Default RE: Re: RE: hard to edit template!

    again, what do yuo wnat to change
    Always listen to experts. They\'ll tell you what can\'t be done and why. Then do it.

    /clauska

  6. #6
    New Member
    Join Date
    Sep 2006
    Posts
    29
    Rep Power
    0


    Default RE: Re: RE: hard to edit template!

    i want move laggues selection, currencies, and shopping cart show on top header like the link i provide

  7. #7
    Member
    Join Date
    Aug 2004
    Posts
    49
    Rep Power
    0


    Default RE: Re: RE: hard to edit template!

    Which version of oscMax and which template are you using? I can help you out with this, but I have to know those two things.

  8. #8
    New Member
    Join Date
    Sep 2006
    Posts
    29
    Rep Power
    0


    Default Re: RE: Re: RE: hard to edit template!

    Quote Originally Posted by jbanda
    Which version of oscMax and which template are you using? I can help you out with this, but I have to know those two things.
    i use the fallback template....

  9. #9
    Member
    Join Date
    Aug 2004
    Posts
    49
    Rep Power
    0


    Default

    Okay, good. I'm going to assume that you're using v.2 RC3 as well.

    Adding navigation to the header is fairly easy - if you open main_page.tpl.php you'll see there's already some there - to the account page, the shopping cart and to the checkout process at line 89. It's all inside it's own table.

    Based on the example you gave, you'll have to create your new header graphic and navigation tabs in a graphics program, store them in the main images directory and then create the static pages that the tabs will link to, if you're not linking to existing pages. Creating static pages is well documented in the Wiki, and if you want to edit them with the WYSIWYG editor, see the post at the top of this section.

    The easiest way to do this would be to comment out the table containing the header and create a new one directly below it, adding your new header graphic and the tabbed navigation. It might look something like this:

    <!--<table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr class="header">
    <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscmax.gif', 'osCMax v2.0 - Power E-Commerce') . '</a>'; ?></td>
    <td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>
    </tr>
    </table>-->
    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr class="header">
    <td colspan="4"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'header_image.gif', 'Image Description') . '</a>'; ?></td>
    </tr>
    <tr class="header">
    <td><?php echo '<a href="' . tep_href_link(FILENAME_PAGE_1) . '">' . tep_image_button('tab_1.gif', IMAGE_TAB_1) . '</a>'; ?></td>
    <td><?php echo '<a href="' . tep_href_link(FILENAME_PAGE_2) . '">' . tep_image_button('tab_2.gif', IMAGE_TAB_2) . '</a>'; ?></td>
    <td><?php echo '<a href="' . tep_href_link(FILENAME_PAGE_3) . '">' . tep_image_button('tab_3.gif', IMAGE_TAB_3) . '</a>'; ?></td>
    <td><?php echo '<a href="' . tep_href_link(FILENAME_PAGE_4) . '">' . tep_image_button('tab_4.gif', IMAGE_TAB_4) . '</a>'; ?></td>
    </tr>
    </table>

    Remember that when creating the links to the pages, you have to code them in PHP. If you create the links in standard HTML, they'll work but if your site visitor is logged in to the site, clicking on the links will log them off.

    I hope this helped.

  10. #10
    Member
    Join Date
    Aug 2004
    Posts
    49
    Rep Power
    0


    Default

    Okay, I'm a twit...I re-read your post and see that you're trying to add the navigation at the top of the header, not the tabbed navigation at the bottom. A little more problematic, but the process is the same as my earlier description.

    When you create the new table, add the portion with the navigation before the header graphic. Here's how it might look, with the proper code for those functions:

    <td>
    <?php echo TEXT_CHOOSE_LANGUAGE; ?>
    <?php
    if (!isset($lng) || (isset($lng) && !is_object($lng))) {
    include(DIR_WS_CLASSES . 'language.php');
    $lng = new language;
    }

    $languages_string = '';
    reset($lng->catalog_languages);
    while (list($key, $value) = each($lng->catalog_languages)) {
    $languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';
    };
    echo $languages_string;
    ?>
    </td>
    <td>
    <?php
    reset($currencies->currencies);
    $currencies_array = array();
    while (list($key, $value) = each($currencies->currencies)) {
    $currencies_array[] = array('id' => $key, 'text' => $value['title']);
    }

    $hidden_get_variables = '';
    reset($HTTP_GET_VARS);
    while (list($key, $value) = each($HTTP_GET_VARS)) {
    if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {
    $hidden_get_variables .= tep_draw_hidden_field($key, $value);
    }
    }
    ?>
    <?php echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get');?>
    <?php echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();"');?>
    </form>
    </td>
    <td>
    <?php echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image_button('cart_icon.gif', IMAGE_BUTTON_SHOPPING_CART) . '</a>'; ?>
    </td>

    You'll have to edit the english.php file in includes/languages to define the "TEXT_CHOOSE_LANGUAGE". Again, I hope this helps, and my apologies for the confusion.

    If I had a brain, I'd be dangerous.

Page 1 of 2 12 LastLast

Similar Threads

  1. SSL symbol vanishes when I edit a template
    By jonnyl in forum osCmax v2 Customization/Mods
    Replies: 2
    Last Post: 06-07-2006, 09:36 AM
  2. easy populate turning out to be hard.. please help
    By [wicked] in forum osCmax v2 Customization/Mods
    Replies: 2
    Last Post: 08-16-2005, 12:41 PM
  3. Edit attributes - Something Something isn't right
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 4
    Last Post: 02-08-2005, 02:16 PM
  4. How do I edit english.php?
    By ScaleCreep in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 12-30-2004, 03:56 AM
  5. How do I edit these files?
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 08-03-2004, 01:18 PM

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
  •