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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| 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 |
| Sponsored Links | ||
| ||
|
#2
| |||
| |||
| Which template are you using? What are you trying to change? |
|
#3
| |||
| |||
| Quote:
so thinking follow the layout... i mean the arrangement for the module thank you jikey |
|
#4
| |||
| |||
| anyone???? ???? |
|
#5
| |||
| |||
| 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
| |||
| |||
| i want move laggues selection, currencies, and shopping cart show on top header like the link i provide |
|
#7
| |||
| |||
| 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
| |||
| |||
| Quote:
|
|
#9
| |||
| |||
| 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. |
|
#10
| |||
| |||
| 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. |
| The Following User Says Thank You to jbanda For This Useful Post: | ||
liquidshadow (10-28-2007) | ||
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SSL symbol vanishes when I edit a template | jonnyl | osCMax v2 Customization/Mods | 2 | 06-07-2006 09:36 AM |
| easy populate turning out to be hard.. please help | [wicked] | osCMax v2 Customization/Mods | 2 | 08-16-2005 12:41 PM |
| Edit attributes - Something Something isn't right | Anonymous | osCMax v1.7 Discussion | 4 | 02-08-2005 02:16 PM |
| How do I edit english.php? | ScaleCreep | osCommerce 2.2 Modification Help | 2 | 12-30-2004 03:56 AM |
| How do I edit these files? | Anonymous | osCMax v1.7 Discussion | 2 | 08-03-2004 01:18 PM |