This is a discussion on HELLP ME ! to install contrib ... within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; Hi guys As I told ya before, I gotta make a catalog like this http://www.officenet.com.ar/default.asp I mean: to show all ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi guys As I told ya before, I gotta make a catalog like this http://www.officenet.com.ar/default.asp I mean: to show all main categories and subs in the mainpage After trying some, I got this, which is the "easiest" for me http://www.oscommerce.com/community/...,subcategories I've put the php code this contrib uses in includes/languages/english/mainpage.php Code: <?php
error_reporting(E_ALL);
define ('NR_COLUMNS', 1);
$languages_query = tep_db_query("select languages_id, name, code, image, directory from " . TABLE_LANGUAGES . " order by sort_order");
while ($languages = tep_db_fetch_array($languages_query)) {
$languages_array[] = array('id' => $languages['languages_id'],
'name' => $languages['name'],
'code' => $languages['code'],
'image' => $languages['image'],
'directory' => $languages['directory']);
}
for ($i=0; $i<1; $i++) {
// for ($i=0; $i<sizeof($languages_array); $i++) {
$this_language_id = $languages_array[$i]['id'];
$this_language_name = $languages_array[$i]['name'];
$this_language_code = $languages_array[$i]['code'];
$this_language_image = $languages_array[$i]['image'];
$this_language_directory = $languages_array[$i]['directory'];
echo " <tr>\n";
$categories_query = tep_db_query("SELECT categories_id, categories_name FROM " . TABLE_CATEGORIES_DESCRIPTION . " WHERE language_id = $this_language_id ORDER BY categories_name");
$categories_array = array();
while($categories = tep_db_fetch_array($categories_query)) {
$categories_id = $categories['categories_id'];
$categories_array[] = array('id' => $categories['categories_id'],
'name' => $categories['categories_name']);
}
for ($j=0; $j<NR_COLUMNS; $j++) {
echo " <td class=main valign=\"top\">\n";
for ($k=$j; $k<sizeof($categories_array); $k+=NR_COLUMNS) {
$this_categories_id = $categories_array[$k]['id'];
$this_categories_name = $categories_array[$k]['name'];
echo " <a href=\"" . tep_href_link('index.php', 'name=' .str_replace("/", "/", rawurlencode($this_categories_name)). "/" . "cPath/" . $categories_id . $this_categories_id . (($this_language_code == DEFAULT_LANGUAGE) ? '' : ('&language=' . $this_language_code)), 'NONSSL', false) . "\">" . $this_categories_name . "</a>\n";
}
echo " </td>\n";
}
echo " </tr>\n";
}
?>
take a look: www.ofidocta.com.ar/catalogo 1) The link generated by oscMax for an example category is: http://www.ofidocta.com.ar/catalogo/index.php/cPath/2 but AllCategories's code generates for same category this link http://www.ofidocta.com.ar/catalogo/...22/language/en 2) The order displayed is not the same How can I do to show: main_category_name1 subcategory1 / subcategory2 / subcategory3 / main_category_name2 subcategory2_1 / subcategory2_2 / subcategory2_3 / I can give ftp data to someone who any1 who wants to help me. I'm in msn available almost the whole day. Just tell me. Gotta finish this soon... Thanks a lot. Hope your help...
__________________ Henry Becerra ICQ: 18048153 MSN: qbecerra@hotmail.com Yahoo: qbecerra http://www.beza.com.ar San Juan - Argentina |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| installing GPG contrib | kerrydax | osCommerce 2.2 Modification Help | 27 | 08-20-2006 02:01 PM |
| Multi Stores contrib in OsC Max-Is it possible? | InaFlap | osCMax v2 Customization/Mods | 0 | 08-05-2006 04:11 PM |
| Linkpoint - Which contrib to use? Please help! | giyer | osCommerce 2.2 Modification Help | 13 | 02-13-2006 09:14 AM |
| help with pwa contrib | dmiles | osCMax v1.7 Discussion | 8 | 05-15-2004 03:50 PM |
| Ask A Qusetion Contrib?? | Kristine | osCMax v1.7 Discussion | 1 | 04-11-2004 09:41 PM |