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![]()
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 ...
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![]()
Which template are you using? What are you trying to change?
well found this template http://osc.template-help.com/10063/index.phpOriginally Posted by jbanda
so thinking follow the layout... i mean the arrangement for the module
thank you
jikey
anyone???? ????
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
i want move laggues selection, currencies, and shopping cart show on top header like the link i provide
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....Originally Posted by jbanda
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>&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>&nbsp;&nbsp;</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.
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.![]()
Bookmarks