osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

how to expand the categories in home page

This is a discussion on how to expand the categories in home page within the osCMax v2 Features Discussion forums, part of the osCMax v2.0 Forums category; Dear sir In the home page I wish to have the products diplayed by default under the various categories category ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Features Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 07-28-2007, 02:59 AM
Member
 
Join Date: Jul 2007
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2
soibaal is on a distinguished road
Default how to expand the categories in home page

Dear sir

In the home page I wish to have the products diplayed by default under the various categories

category one
product 1
product 2

how can i do. is there a contribution. i cannot locate it.

thanks a million.

ashok
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #2  
Old 07-29-2007, 11:56 PM
Member
 
Join Date: Jul 2007
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2
soibaal is on a distinguished road
Default Re: how to expand the categories in home page

Dear friends

i found this in oscommerce contributions. This creates a drop down of products in the home page.

a) Just save it in as products_drop.php and upload to catalog/includes/boxes.

<?php
/*
osCommerce, Open Source E-Commerce Solutions
osCommerce, Open Source Online Shop E-Commerce Solutions

Copyright (c) 2001 osCommerce

Released under the GNU General Public License
*/
?>
<tr>
<td>
<?php
new infoBox($info_box_contents, false, false);

$products_query = tep_db_query("select p.products_id, pd.products_name, c.categories_id, cd.categories_name, p2c.categories_id, p2c.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and c.categories_id = cd.categories_id and p.products_id = p2c.products_id and c.categories_id = p2c.categories_id and pd.language_id = '" . (int)$languages_id . "' and cd.language_id = '" . (int)$languages_id . "' order by pd.products_name");
if ($number_of_rows = tep_db_num_rows($products_query)) {

$products_array = array();
$products_array[] = array('id' => '', 'text' => 'Select Product');

while ($products = tep_db_fetch_array($products_query)) {
$products_name = $products['products_name'] . '&nbsp;-&nbsp;' . $products['categories_name'];
$products_array[] = array('id' => $products['products_id'],
'text' => $products_name);
}

$info_box_contents = array();
$info_box_contents[] = array('form' => tep_draw_form('products', tep_href_link(FILENAME_PRODUCT_INFO, '', 'NONSSL', false), 'get'),
'text' => tep_draw_pull_down_menu('products_id', $products_array, (isset($HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_PRODUCTS_LIST . '" style="width: 200"') . tep_hide_session_id());


new infoBox($info_box_contents);
}
?>
</td>
</tr>


b) write a code in catalog/includes/column_left.php or in catalog/includes/column_right.php
before ?> or a anywhere between <?php ---- ?>
include(DIR_WS_BOXES . 'products_drop.php');

---------------------------------------------------------------

My requirement is not a drop down but a list of products.
how do i achieve it.

regards
ashok



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

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
home page; what should it be? nicki-jo osCMax v2 Installation issues 1 05-03-2007 07:02 PM
Categories Images on Home Page yulises osCMax v2 Customization/Mods 2 03-28-2007 08:39 AM
Product detail page as the home/main page??? sukarya osCommerce 2.2 Modification Help 1 02-17-2006 06:21 AM
how can I add a log in form to my home page... fer_75 osCommerce 2.2 Discussion 7 08-11-2005 06:14 AM
Catagories on the home page! pthurmond osCMax v1.7 General Mods Discussion 3 08-01-2005 10:47 AM


All times are GMT -8. The time now is 12:01 PM.


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