Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Manufactures And Catergories


hackia

Recommended Posts

Posted

Hello People.

 

I have a site

 

qqfbotique.com/catalog

 

and my boss wants me to make the menns for categories and products list down side by side like the following website

 

lindsaylou.com

 

does anyone know what i gots to do?

 

 

Any help appreciated

 

Thanks

Posted

[Please search for answers first, there all here already asked before.

 

like: http://www.oscommerce.com/forums/lofiversion/i...hp?t313935.html

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

actually, she is asking for something different..

 

She wants the categories box to actually server as TWO boxes..

 

The header would have two text links

 

Categories Manufacturers

 

By defualt, the categories would show in that box, but if you click manufacturers, then the categories would be replaced by manufacturers.. its seems to me like a simple if statement to say if "this link" clicked, show THIS box. Then you can have two separate boxes, but they would have the same style.

 

just a guess, i am not a coder

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Posted

Oh, did'nt spot that, only took v quick look, its two expanded category boxes with some css switching. Just needs some coding to achieve.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

that is what i was thinking.. Just switch which each link.. you can ask me to code it though ;)

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Posted
that is what i was thinking.. Just switch which each link.. you can ask me to code it though ;)

 

hey Lindsay,

 

Ya would you code it, for me i would really really appreciate it. If you need any info from me just ask, or email me at [email protected]. i check me email a bunch. You are the best!!!

 

 

Thanks

Posted

here are my inclde files

 

catergories

 

<?php

/*

$Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

function tep_show_category($counter, $count) {

global $tree, $categories_string, $cPath_array, $ii;

 

if ($count == 0 ) $kk=' class="bg_list"'; else $kk=' class="bg_list"';

 

$count++;

 

if(!$tree[$counter]['level']){

$categories_string .= $categories_string ? '' : '';

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

 

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($counter);

if ($products_in_category > 0) {

$num_prod = ' ('.$products_in_category.')';

 

}

}

 

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 .= $num_prod.'</a></li>';

 

}else{

 

// SUBCATEGORY

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($counter);

if ($products_in_category > 0) {

$num_prod = ' ('.$products_in_category.')';

}

}

$count = 2;

$categories_string .= '';

 

 

$categories_string .= '<li class="bg_list_sub">';

 

for($i=0;$i<$tree[$counter]['level'];$i++)

$categories_string .= '   ';

 

$categories_string .= '<a 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 .= $num_prod.'</a></li>';

}

 

 

 

if ($tree[$counter]['next_id'] != false && $ii < 30) {

tep_show_category($tree[$counter]['next_id'], $count);

}

}

?>

<!-- categories //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

 

new infoBoxHeading($info_box_contents, true, false);

 

$categories_string = '<ul>';

$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;

}

}

}

$count = 0;

tep_show_category($first_element, $count);

$categories_string .='</ul>';

$info_box_contents = array();

$info_box_contents[] = array('text' => $categories_string);

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- categories_eof //-->

 

 

 

manufactures

 

 

<?php

/*

$Id: manufacturers.php,v 1.19 2003/06/09 22:17:13 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

$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)) {

?>

<tr><td>

<!-- manufacturers //-->

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_MANUFACTURERS);

 

new infoBoxHeading2($info_box_contents, false, false);

 

if ($number_of_rows <= MAX_DISPLAY_MANUFACTURERS_IN_A_LIST) {

// Display a list

$manufacturers_list = '';

while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {

$manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);

if (isset($HTTP_GET_VARS['manufacturers_id']) && ($HTTP_GET_VARS['manufacturers_id'] == $manufacturers['manufacturers_id'])) $manufacturers_name = '<b>' . $manufacturers_name .'</b>';

$manufacturers_list .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . $manufacturers_name . '</a><br>';

}

 

$manufacturers_list = substr($manufacturers_list, 0, -4);

 

$info_box_contents = array();

$info_box_contents[] = array('text' => $manufacturers_list);

} else {

// Display a drop-down

$manufacturers_array = array();

if (MAX_MANUFACTURERS_LIST < 2) {

$manufacturers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);

}

 

while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {

$manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);

$manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],

'text' => $manufacturers_name);

}

 

$info_box_contents = array();

$info_box_contents[] = array('form' => tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get'),

'text' =>'

<table cellpadding="0" cellspacing="0" border="0">

<tr>

<td align="center"><br style="line-height:2px">'.tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style=" width:100%;"') . tep_hide_session_id().

'</td>

</tr>

</table>

 

');

}

 

new infoBox2($info_box_contents);

?>

<!-- manufacturers_eof //-->

<?php

}

?>

</td></tr>

 

hope this helps thanks for helpin

Posted

Most know, thats why they use google with site:http://www.oscommerce.com/forums plus query

to find things.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

Certainly does, you just have to keep looking and trying.

 

Have a read of the last but one post post in the first link when you google

 

site:www.oscommerce.com/forums "how to search"

 

2003 to now , no change.....

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted

ok, i did just say in my previous code that i can not write code. I am just not good at it and i hardly have time to work on my own site let alone code someone else's stuff. A lot of people on here help me with things so, so i try to give back by helping as much as i can, but unfortunately, custom coding is NOT my expertise. I am good at trouble shooting, finding issues, and explaining things to new people (because i am still new)

 

i suggest you just read up on html and php. Maybe find a snippet of code from somewhere else to help you

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...