snubbr.com

Do you need to buy a Verisign SSL certificate to publish a website?

Get a Verisign SSL certificate for 30 days FREE. Click here to use coupon...

Get a free trial of Verisign SSL certificates. Click here for this special deal...
Got a question... Do you need to buy a Verisign SSL certificate to publish a website? Many thanks for any answer or 2. Another question... Hi,.

I'm working on my first osCommerce Verisign site and was wondering if there is a good method to drop some of the tables and use div and lists instead..

For example the boxes/categories.php seems to pull directly from the db and create a table on the fly..

What would be a good method to make this a <ul/> or a div..

Thanks..

Comments (78)

I'm stumped. I'm not so sure what is the right answer. I'll do some research in Google and get back to you if I find an anything. You should email the people at Verisign as they probably could help you..

Comment #1

Huh? Alex, what you said made no sense..

Getting osC to be valid XHTML is a fairly long process, but it's made easier by the two template systems available - STS and BTS. I'm a big BTS supporter (my posts.

Here.

And.

Here.

Explain why), but there is a lot more support available for STS...

Comment #2

I did a contribution that converts all the left and right column boxes to CSS but I am not happy with it. That would take care of the boxes. The main content area is easy as you can just rip apart the pages or take a look at oscss.org and see what they have done...

Comment #3

Thanks for the reply. I'm in need of a solution that that won't change the template completely. The client/developer isn't open to this idea..

Looks like a good starting point though..

The category box file and the right and left templates seem to have alot of tables that aren't necessary is there a way to keep the same file structure and use different syntax to load the content in lists?..

Comment #4

<?php.

/*.

$Id: categories.php 1739 2007-12-20 00:52:16Z hpdl $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright (c) 2003 osCommerce.

Released under the GNU General Public License.

*/.

Function tep_show_category($counter) {.

Global $tree, $categories_string, $cPath_array;.

For ($i=0; $i<$tree[$counter]['level']; $i++) {.

$categories_string .= "";.

}.

$categories_string .= ' <li><a href="';.

If ($tree[$counter]['parent'] == 0) {.

$cPath_new = 'cPath='$counter;.

} else {.

$cPath_new = 'cPath='$tree[$counter]['path'];.

}.

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new)'">';.

If (isset($cPath_array) && in_array($counter, $cPath_array)) {.

$categories_string .= '<b>';.

}.

// display category name.

$categories_string .= $tree[$counter]['name'];.

If (isset($cPath_array) && in_array($counter, $cPath_array)) {.

$categories_string .= '</b>';.

}.

If (tep_has_category_subcategories($counter)) {.

$categories_string .= '-&gt;';.

}.

$categories_string .= '</a>';.

If (SHOW_COUNTS == 'true') {.

$products_in_category = tep_count_products_in_category($counter);.

If ($products_in_category > 0) {.

$categories_string .= '&nbsp;('$products_in_category')';.

}.

}.

$categories_string .= '</li>.

';.

If ($tree[$counter]['next_id'] != false) {.

Tep_show_category($tree[$counter]['next_id']);.

}.

}.

?>.

<! categories //>.

<div class="column">.

<div class="column_header">.

<div class="column_header_left"><h4><?php echo BOX_HEADING_CATEGORIES;?></h4></div>.

</div>.

<ul>.

<?php.

$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 (tep_not_null($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;.

}.

}.

}.

Tep_show_category($first_element);.

Echo $categories_string;.

?>.

</ul>.

</div>.

<! categories_eof //>..

Comment #5

I just tried your download ABCommerce!.

And over wrote the i/b/categories.php and it took perfectly!!!.

Nice clean code just what I was looking for..

Why are you not happy with it?..

Comment #6

I don't like the way the form is done for the search box in the contribution...

Comment #7

Hi,.

I'm working on my first osCommerce Verisign site and was wondering if there is a good method to drop some of the tables and use div and lists instead..

For example the boxes/categories.php seems to pull directly from the db and create a table on the fly..

What would be a good method to make this a <ul/> or a div..

Thanks..

Comment #8

Web 2.0 is based on div. You can use better div instead of <ul/>..

Comment #9


This question was taken from a support group/message board and re-posted here so others can learn from it.

 

Categories: Home | Diet & Weight Management | Vitamins & Supplements | Herbs & Cleansing |

Sexual Health | Medifast Support | Nutrisystem Support | Medifast Questions |

Web Hosting | Web Hosts | Website Hosting | Hosting |

Web Hosting | GoDaddy | Digital Cameras | Best WebHosts |

Web Hosting FAQ | Web Hosts FAQ | Hosting FAQ | Hosting Group |

Hosting Questions | Camera Tips | Best Cameras To Buy | Best Cameras This Year |

Camera Q-A | Digital Cameras Q-A | Camera Forum | Nov 2010 - Cameras |

Oct 2010 - Cameras | Oct 2010 - DSLRs | Oct 2010 - Camera Tips | Sep 2010 - Cameras |

Sep 2010 - DSLRS | Sep 2010 - Camera Tips | Aug 2010 - Cameras | Aug 2010 - DSLR Tips |

Aug 2010 - Camera Tips | July 2010 - Cameras | July 2010 - Nikon Cameras | July 2010 - Canon Cameras |

July 2010 - Pentax Cameras | Medifast Recipes | Medifast Recipes Tips | Medifast Recipes Strategies |

Medifast Recipes Experiences | Medifast Recipes Group | Medifast Recipes Forum | Medifast Support Strategies |

Medifast Support Experiences |

 

(C) Copyright 2010 All rights reserved.