osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

How to create alphabetical links within categories/sub-categories

This is a discussion on How to create alphabetical links within categories/sub-categories within the Member Articles forums, part of the Community category; I got it working! Here it is: In the catalog\includes\modules\product_listing.php add this where you want the navigation to be: HTML ...



Find us on Facebook
Go Back   osCommerce and osCMax shopping cart software forums > Community > Member Articles

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


Closed Thread

 

LinkBack Thread Tools
  #1  
Old 05-31-2007, 06:47 PM
Active Member
 
Join Date: Aug 2004
Posts: 117
Thanks: 4
Thanked 1 Time in 1 Post
Rep Power: 0
basnyd is an unknown quantity at this point
Default Re: Alphabetical links within categories/sub-categories

I got it working! Here it is:

In the catalog\includes\modules\product_listing.php add this where you want the navigation to be:
HTML Code:
<table width="100%" border="0" cellspacing="2" cellpadding="1">
<tr><td class=main align=center>
<a href=index.php?cName=<?php echo $cName?>&alpha=a>A</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=b>B</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=c>C</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=d>D</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=e>E</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=f>F</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=g>G</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=h>H</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=i>I</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=j>J</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=k>K</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=l>L</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=m>M</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=n>N</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=o>O</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=p>P</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=q>Q</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=r>R</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=s>S</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=t>T</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=u>U</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=v>V</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=w>W</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=x>X</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=y>Y</a> |
<a href=index.php?cName=<?php echo $cName?>&alpha=z>Z</a><br /><br />
</td></tr></table> 
In catalog\index.php modifying the existing query to read (towards end of file):

PHP Code:
} else { // either retail or no need to get correct special prices
// LINE CHANGED: MS2 update 501112
// added alpha page selections to query
       
if (!is_null($_GET['alpha'])) $addregex "pd.products_name REGEXP '^[".strtoupper($_GET['alpha'])."!".strtolower($_GET['alpha'])."].*$' and ";

       
$listing_sql "select " $select_column_list " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " TABLE_PRODUCTS_DESCRIPTION " pd, " TABLE_PRODUCTS " p left join " TABLE_MANUFACTURERS " m on p.manufacturers_id = m.manufacturers_id left join " TABLE_SPECIALS_RETAIL_PRICES " s on p.products_id = s.products_id, " TABLE_PRODUCTS_TO_CATEGORIES " p2c where ".$addregex." p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id "' and p2c.categories_id = '" . (int)$current_category_id "'";
      } 
// end else { // either retail...
// EOF: MOD - Separate Pricing Per Customer
      
}
    } 
I hope this helps others.
Barb
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
Can't create categories / products fidsalazar osCMax v2 Installation issues 17 06-16-2008 02:36 AM
Alphabetical links within categories/sub-categories basnyd osCMax v2 Customization/Mods 11 03-18-2008 04:23 AM
Categories font color deferent than other links yulises osCMax v2 Customization/Mods 2 08-14-2007 07:59 AM
Categories box. How can I create a new one (or two...)?? Csc osCommerce 2.2 Modification Help 1 01-15-2005 02:20 PM
categories links not working carruthers1 osCommerce 2.2 Modification Help 0 04-07-2004 11:57 PM


All times are GMT -8. The time now is 07:48 AM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2009 osCMax
Inactive Reminders By Icora Web Design