I would like to know if converting a standard osc template to oscmax2 is straight forward or if there are any areas in particular that are likely to be quite complex for a novice. I would be very grateful for any tips and advice please.
Phil.
This is a discussion on How to Convert standard OSC template to Max2 ?? within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I would like to know if converting a standard osc template to oscmax2 is straight forward or if there are ...
I would like to know if converting a standard osc template to oscmax2 is straight forward or if there are any areas in particular that are likely to be quite complex for a novice. I would be very grateful for any tips and advice please.
Phil.
It is only straightforward if you are fluent with BTS system and standard osC. You basically will need to strip out all the html elements into tpl.php files from the standard osC template (which really is not a template at all, but a full on customization of osCommerce and a complete installation package).
Many of the templates use custom boxes, and are missing a lot of the elements included in osCMax like the box control, multiple menu types, etc, and need to be tweaked to use the osCMax mods.
If you don't know what you are doing with BTS, it can be a major undertaking...
Michael Sasek
osCMax Developer
osCmax installation service - Have our professionals install osCmax on your server - same day service!
osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0
Stay Up To Date with everything osCMax:
Free osCMax Newsletters - Security notices, New Releases, osCMax News
osCMax on Twitter - Up to the minute info as it happens. Know it first.
osCmax Documentation
Most of the sites looks can be done via CSS and adding your own buttons and editing your main template to suit and to insert your logo etc..... This will be 80-90%+ of these "templates" BOX mods are a bit more to do but then edit your BOX template as needed. You should get 95-99% of the look you want. The balance is just tweaking what you want to suit your own needs to get the 100%.
Good Luck
JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
Try out our osCMax at: Live Catalog Demo
Limited access Admin: Live Admin Demo
Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!
Seriously struggling here. Managed to get heading sorted but the side boxes are just not playing ball at all. I thought I had found the answer in this link http://oscdox.com/PNphpBB2-viewtopic...ategories.html but I must be doing something seriously wrong somwhere.
What I am trying to achieve is something close to the look of the default install http://www.sensorytoys.co.uk/
I followed the instructions and created the new css class's inside of my stylesheet called:
.manufacturers {
background-image: url(../../images/m08.gif);
width: 211
}
and the sames for categories:
.categories {
background-image: url(../../images/m08.gif);
width: 211
}
then modified the infobox code from within templates/fallback/boxes/box.tpl .php and also templates/fallback/mytemplatefolder/boxes/box.tpl.php to reflect these changes as per the following forum instructions:
The result was the correct image on screen but all my categories disappeared.1) make a list of the infoboxes
2) make a class for each infobox in the CCS using the background: style that you want, etc.
3) locate the line below Code:
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="14" class="infoBoxHeading"><img src="images/infobox/<?php switch ($corner_left) { case 'square': echo 'corner_right_left.gif';
break; case 'rounded': echo 'corner_left.gif'; break;} ?>" border="0" alt="" width="11" height="14"></td>
<td width="100%" height="14" class="infoBoxHeading"><?php echo
$boxHeading; ?></td>
<td height="14" class="infoBoxHeading" nowrap><?php echo $boxLink; ?><img src="images/<?php switch ($corner_right) { case 'square': echo 'pixel_trans.gif'; break; case 'rounded': echo 'infobox/corner_right.gif'; break;}
?>" border="0" alt="" width="11" height="14"></td>
</tr>
</table>
or something very similar (this line was taken from the fallback template)
4) replace the code with something like:
Code:
<td height="14" class="<?echo $box_base_name; ?>"
or
Code:
<td height="14" class="<?echo $box_id; ?>"
The secret to all of this is found in the /includes/boxes where you will find the following code
Code:
$box_base_name = 'information'; // for easy unique box template setup (added B
TSv1.2)
$box_id = $box_base_name . 'Box'; // for CSS styling paulm (editted BTSv1.2)
The original code for the side menus and search bar was implemented as follows in the original template from within header.php:
<table cellspacing=0 cellpadding=0 width=211>
<tr><td height=3></td></tr>
<tr><td background=images/m07.gif width=211 height=30><span style="padding-left: 10px"></span><span class=ch5>Browse by category</span></td></tr>
<? // ---- CATEGORIES
function tep_show_category($counter) {
global $tree, $categories_string, $cPath_array;
if(!$tree[$counter]['level']){
$categories_string .= $categories_string ? '' : '';
$categories_string .= '<tr><td background=images/m08.gif width=211 height=20><span class=ch6></span><a class=ml3 href=';
if ($tree[$counter]['parent'] == 0) {
$cPath_new = 'cPath=' . $counter;
} else {
$cPath_new = 'cPath=' . $tree[$counter]['path'];
}
$categories_string .= tep_href_link('index.php', $cPath_new) . '>';
// display categry name
$categories_string .= $tree[$counter]['name'];
$categories_string .= '</a></td></tr> ';
}else{ // SUBCATEGORY
$categories_string .= '<tr><td background=images/m08.gif width=211 height=20><span class=ch6></span> &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;';
for($i=0;$i<$tree[$counter]['le vel'];$i++)
$categories_string .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;';
$categories_string .= '&nbsp;&nbsp;&nbsp; <a class=ml3 style="font-weight:normal;" href=';
if ($tree[$counter]['parent'] == 0) {
$cPath_new = 'cPath=' . $counter;
} else {
$cPath_new = 'cPath=' . $tree[$counter]['path'];
}
$categories_string .= tep_href_link('index.php', $cPath_new) . '>-';
// display category name
$categories_string .= $tree[$counter]['name'];
$categories_string .= '</a></td></tr>';
}
if ($tree[$counter]['next_id'] != false) {
tep_show_category($tree[$counter]['next_id']);
}
}
define(TABLE_CATEGORIES, "categories");
define(TABLE_CATEGORIES_DESCRIPTION, "categories_description");
$categories_string = '';
$tree = array();
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
while ($categories = tep_db_fetch_array($categories_query)) {
$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],
'parent' => $categories['parent_id'],
'level' => 0,
'path' => $categories['categories_id'],
'next_id' => false);
if (isset($parent_id)) {
$tree[$parent_id]['next_id'] = $categories['categories_id'];
}
$parent_id = $categories['categories_id'];
if (!isset($first_element)) {
$first_element = $categories['categories_id'];
}
}
//------------------------
if ($cPath) {
$new_path = '';
reset($cPath_array);
while (list($key, $value) = each($cPath_array)) {
unset($parent_id);
unset($first_id);
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
if (tep_db_num_rows($categories_query)) {
$new_path .= $value;
while ($row = tep_db_fetch_array($categories_query)) {
$tree[$row['categories_id']] = array('name' => $row['categories_name'],
'parent' => $row['parent_id'],
'level' => $key+1,
'path' => $new_path . '_' . $row['categories_id'],
'next_id' => false);
if (isset($parent_id)) {
$tree[$parent_id]['next_id'] = $row['categories_id'];
}
$parent_id = $row['categories_id'];
if (!isset($first_id)) {
$first_id = $row['categories_id'];
}
$last_id = $row['categories_id'];
}
$tree[$last_id]['next_id'] = $tree[$value]['next_id'];
$tree[$value]['next_id'] = $first_id;
$new_path .= '_';
} else {
break;
}
}
}
$categories_string .= '';
tep_show_category($first_element);
$categories_string .= '';
echo $categories_string;
?>
<tr><td background=images/m09.gif width=211 height=30><span style="padding-left: 10px"></span><span class=ch7>Browse by brand</span></td></tr>
<? // ---- MANUFACTURERS STRING OUTPUT
$manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
if ($number_of_rows = tep_db_num_rows($manufacturers_query)) {
$manufacturers_array = array();
while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
$output .= $output ? '' : '';
$output .= '<tr><td background=images/m08.gif width=211 height=20><span class=ch6></span><a class=ml3 href=';
$manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
$output .= tep_href_link('index.php', 'manufacturers_id='.$manufacturers['manufacturers_id']). '>'.$manufacturers_name;
$output .= '</a></td></tr>';
}
echo $output;
}
?>
<tr><td background=images/m10.gif width=211 height=112 style="padding-left: 19px" valign=top>
<? // SEARCH ?>
<table cellspacing=0 cellpadding=0 width=174>
<?=tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get')?>
<tr><td height=12</td></tr>
<tr><td class=ch8>Site Search</td></tr>
<tr><td height=22></td></tr>
<tr><td width=146>
<?=tep_draw_input_field('keywords', '', 'size="20" maxlength="50" onclick="this.value=\'\'" value="keyword" class=se2') . ' ' . tep_hide_session_id()?></td><td><input type=image src=images/m12.gif></td></tr>
</form>
</table>
<? // END SEARCH ?>
</td></tr>
</table>
Strangely enough if I copy the original header.php from the template into the css folder and rename it to main_page.tpl and also copy over the stylesheet everything appears as it should do except I cannot actually get any of the buttons to work.
Would really appreciate some advise from all you experts please.
Phil...
Any advise would be appreciated !!!
Help please ... Anybody!!
Bookmarks