osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

How to Convert standard OSC template to Max2 ??

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 04-09-2006, 02:48 AM
Member
 
Join Date: Jun 2004
Location: UK
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
fuzzyphil
Default How to Convert standard OSC template to Max2 ??

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 04-09-2006, 09:40 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: How to Convert standard OSC template to Max2 ??

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 Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 04-10-2006, 06:17 PM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Posts: 1,558
Thanks: 1
Thanked 84 Times in 71 Posts
Rep Power: 10
jpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of light
Default RE: How to Convert standard OSC template to Max2 ??

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
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 04-23-2006, 04:27 PM
Member
 
Join Date: Jun 2004
Location: UK
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
fuzzyphil
Default RE: How to Convert standard OSC template to Max2 ??

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:

Quote:
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 result was the correct image on screen but all my categories disappeared.

The original code for the side menus and search bar was implemented as follows in the original template from within header.php:


Quote:
<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>         ';

for($i=0;$i<$tree[$counter]['le vel'];$i++)
$categories_string .= '    &nbsp ;';

$categories_string .= '    <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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 04-25-2006, 11:51 PM
Member
 
Join Date: Jun 2004
Location: UK
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
fuzzyphil
Default

Any advise would be appreciated !!!

Help please ... Anybody!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
how do i convert oscommerce database backups to oscmax? chuan osCMax v2 Installation issues 1 10-07-2006 06:43 PM
osC Max2 templates deuce osCMax v2 Features Discussion 2 11-16-2005 02:23 PM
Convert Oscommerce dbase to work with osC ms2-max 1.5 - ddruckenmiller osCMax v1.7 Installation 2 11-11-2004 12:40 PM
Content modification in Ms-Max2 whazzy osCMax v1.7 Discussion 7 10-13-2003 03:43 PM
Non Standard Install of MS2-Max maxwelltl osCMax v1.7 Discussion 3 09-24-2003 04:51 PM


All times are GMT -8. The time now is 05:54 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax